类名的设置
在所有兼容W3C規范的瀏覽器中,可以通過setAttribute方法設置元素的類名,即:obj.setAttribute("class", className)。但是IE的形式和這個有區別,在IE中,setAtrribute的第一個參數為"className",即:element.setAtrribute("className", className)。
而所有的瀏覽器都支持element.className屬性。
轉載于:https://www.cnblogs.com/chaoguo1234/archive/2013/03/10/2953098.html
總結
- 上一篇: Oracle 用户管理
- 下一篇: html年月日下拉联动菜单 年月日三下拉