data-attributes:从DOM节点提取数据属性

时间:2021-05-15 16:37:56
【文件属性】:
文件名称:data-attributes:从DOM节点提取数据属性
文件大小:5KB
文件格式:ZIP
更新时间:2021-05-15 16:37:56
JavaScript 数据属性 从DOM节点提取数据属性。 遵循。 安装 通过 : $ npm install data-attributes --save 通过 : $ bower install data-attributes --save 用法 < button data-loading-label =" Loading... " data-color =" #F06 " > Click me </ button > < script > var button = document . querySelector ( 'button' ) ; var data = dataAttributes ( button ) ; data ( button ) ; // {loadingLabel: "Loading...", color: "#F06"} </ script > 原料药 d
【文件预览】:
data-attributes-master
----.gitattributes(11B)
----bower.json(496B)
----test.js(530B)
----.travis.yml(60B)
----LICENSE(1KB)
----README.md(1KB)
----.editorconfig(187B)
----.gitignore(25B)
----index.js(1KB)
----CHANGELOG.md(43B)
----package.json(875B)

网友评论