当前位置: 首页 > 图文教程 > 网络编程 > Javascript > IE DOM实现存在的部分问题及解决方法

Javascript
form中限制文本字节数js代码
use jscript with List Proxy Server Information
use jscript List Installed Software
List Installed Software Features
List Information About the Binary Files Used by an Application
List the Codec Files on a Computer
List the UTC Time on a Computer
List Installed Hot Fixes
excel操作之Add Data to a Spreadsheet Cell
Add Formatted Data to a Spreadsheet
Apply an AutoFormat to an Excel Spreadsheet
JavaScript语法着色引擎(demo及打包文件下载)
类之Prototype.js学习
一款JavaScript压缩工具:X2JSCompactor
iis6+javascript Add an Extension File
jscript之Open an Excel Spreadsheet
jscript之Read an Excel Spreadsheet
jscript之List Excel Color Values
去除图像或链接黑眼圈的两种方法总结
Add a Formatted Table to a Word Document

Javascript 中的 IE DOM实现存在的部分问题及解决方法


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-12   浏览: 329 ::
收藏到网摘: n/a

IE DOM实现存在的部分问题及解决方法 总结了一下,主要在以下两个方面:
1.在IE中脚本不能以setAttribute()来设置其样式信息(css),必须采用element.style.property=value(注:此处value为要设定的值)的方式来实现某个元素的呈现效果。
eg.document.getElementById("id").style.fontweight="normal";
2.IE不支持以setAttribute()来设置其响应事件,虽然这在W3c标准中是被支持,解决方法是采用标记法引用响应事件的处理程序,然后调用相关的处理函数的匿名函数来设置事件程序。
eg.document.getElementById("id").onclick=function (){ deal_with_onclick() };
注:其中deal_with_onclick() 是onclick事件的处理函数。