getAttribute setAttribute removeAttribute
来源:互联网 发布:php订餐系统源码 编辑:程序博客网 时间:2024/06/07 09:49
<body> <input type="button" value="zj" onclick="tj();" class="testbutton" id = "b01"> <script type="text/javascript"> var s = document.getElementById("b01"); //获取属性 var s1= s.getAttribute("class");//testbutton //设置属性 s.setAttribute("class","csbutton"); // alert(s.getAttribute("class"));//csbutton //删除属性 s.removeAttribute("class"); // alert(s.getAttribute("class"));//null s.removeAttribute("value"); alert(s.getAttribute("value"));//null IE zj 非IE不兼容 </script> </body>
阅读全文
1 0
- getAttribute、setAttribute和removeAttribute
- getAttribute setAttribute removeAttribute
- getAttribute、setAttribute 、 removeAttribute
- DOM自定义属性 getAttribute、setAttribute、removeAttribute
- 设置 取消input的disabled属性 getattribute(),setAttribute(),removeattribute()用法
- getAttribute,setAttribute用法示例
- getAttribute()方法和setAttribute()
- getAttribute 与 setAttribute 用法
- object.getAttribute() setAttribute()
- setAttribute和getAttribute
- getParameter() getAttribute() setAttribute()
- setAttribute 和 getAttribute区别
- setAttribute()与getAttribute()
- request.getParameter/setAttribute/getAttribute
- getAttribute/setAttribute的使用
- getSession().getParameter();getSession( ).getAttribute;getSession().removeAttribute()讲解
- 函数语法attributes,getAttribute(name),removeAttribute(name)
- setAttribute和getAttribute的区别
- AIDL详解1——简单数据通信
- Spring缓存注解@Cache使用
- ROS-learning-Unknown
- MVC5+EF6简单实例---以原有SQLServer数据库两表联合查询为例
- 不使用加减乘除对两个整数求和
- getAttribute setAttribute removeAttribute
- MySQL实现类似Oracle的序列
- 统计学习方法笔记(一)
- 性能测试工具篇
- du and df
- Unity资源快速查找小工具
- git的安装、注册和使用
- 20万、50万、100万的算法工程师,到底有什么区别?(合格算法工程师的自我修养)
- jsp页面传值 window.location.href中文乱码问题解决