码迷,mamicode.com
首页 > 其他好文 > 详细

属性模块

时间:2016-09-21 09:01:55      阅读:96      评论:0      收藏:0      [点我收藏+]

标签:

setAttribute
getAttribute
removeAttribute
var el = document.createElement("div")
el.setAttribute("xxx", "1")
el.setAttribute("XxX", "2")
el.setAttribute("XXx", "3")
console.log(el.getAttribute("xxx"))
console.log(el.getAttribute("XxX"))

 

属性模块

标签:

原文地址:http://www.cnblogs.com/jzm17173/p/5891358.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!