setAttribute
来源:互联网 发布:网页视频抓取工具 mac 编辑:程序博客网 时间:2024/04/19 12:33
在 IE6.0 下 setAttribute("Style","display:none") 等Style的属性不备支持。
要用 .style.display="none"代替
FireFox是支持的
例子:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN ">
<html>
<head>
<meta http-equiv= "content-type " content= "text/html; charset=GBK ">
<title> </title>
<script language="javascript">...
function test()...{
var o=document.getElementById("testbtn");
//o.setAttribute("Style","display:none"); //1---IE don't Supported
o.style.display="none"; //1--IE Supported
//o.setAttribute("disabled","true"); //IE and FireFox Supported
}
</script>
</head>
<body onload="test();">
<table border="1">
<tr> <td> ab </td> <td> cd </td>
</tr>
<tr> <td> ef </td> <td> gh </td>
</tr>
</table>
<input id="testbtn" type="button" onClick="test();" value="test3">
</body>
</html>
<html>
<head>
<meta http-equiv= "content-type " content= "text/html; charset=GBK ">
<title> </title>
<script language="javascript">...
function test()...{
var o=document.getElementById("testbtn");
//o.setAttribute("Style","display:none"); //1---IE don't Supported
o.style.display="none"; //1--IE Supported
//o.setAttribute("disabled","true"); //IE and FireFox Supported
}
</script>
</head>
<body onload="test();">
<table border="1">
<tr> <td> ab </td> <td> cd </td>
</tr>
<tr> <td> ef </td> <td> gh </td>
</tr>
</table>
<input id="testbtn" type="button" onClick="test();" value="test3">
</body>
</html>
- setAttribute
- setAttribute
- setAttribute
- setAttribute
- setAttribute
- requset.setAttribute(),session.setAttribute(),aplication.setAttribute()区别
- setAttribute注意
- request.setAttribute
- application.setAttribute
- request.setAttribute
- setAttribute()方法
- setAttribute使用
- setAttribute方法
- setAttribute总结
- setAttribute()方法
- request.setAttribute和session.setAttribute
- request.setAttribute和session.setAttribute
- request.getSession().setAttribute()和 request.setAttribute()
- Delphi程序设计界面的动态调整
- test
- 关于CRC校验的代码
- 学软件的反思
- 《struts2权威指南》学习笔记之struts2 ajax标签s和submit
- setAttribute
- 老友收藏
- 精妙Sql语句
- linux文件系统结构图
- C#:项目二 多表的学生信息系统
- linux文件系统基础知识
- ORACLE官方在线文档-有时间大家好好阅读阅读
- 专家看台:纯做技术是自娱自乐 抛开技术做技术才是出路
- mysql关闭错误提示音