读jQuery之六缓存数据功能介绍_jquery
来源:动视网
责编:小采
时间:2020-11-27 20:59:38
读jQuery之六缓存数据功能介绍_jquery
读jQuery之六缓存数据功能介绍_jquery:很多同学在项目中都喜欢将数据存储在HTMLElement属性上,如 代码如下: Test div.getAttribute('data'); // some data 给页面中div添加了自定义属性data及值some data。后续JS代码中使用getAttribute获取。 jQuery从1.2
导读读jQuery之六缓存数据功能介绍_jquery:很多同学在项目中都喜欢将数据存储在HTMLElement属性上,如 代码如下: Test div.getAttribute('data'); // some data 给页面中div添加了自定义属性data及值some data。后续JS代码中使用getAttribute获取。 jQuery从1.2

很多同学在项目中都喜欢将数据存储在HTMLElement属性上,如
代码如下:
Test
读jQuery之六缓存数据功能介绍_jquery
读jQuery之六缓存数据功能介绍_jquery:很多同学在项目中都喜欢将数据存储在HTMLElement属性上,如 代码如下: Test div.getAttribute('data'); // some data 给页面中div添加了自定义属性data及值some data。后续JS代码中使用getAttribute获取。 jQuery从1.2