IE6/7/8/9中Table/Select的innerHTML不能赋值的解决方法
2011-04-07 23:28
567 查看
IE6/7/8/9中Table/Select的innerHTML赋值会报错,如下
IE6/7/8/9中TABLE的innerHTML不能赋值
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
Select元素的innerHTML也不能赋值,
IE6/7/8/9中Select的innerHTML不能赋值
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
IE6/7/8/9中TABLE的innerHTML不能赋值
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
IE6/7 :
IE8 :
IE9 :
Firefox/Safari/Chrome/Opera中正常。Ext.DomHelper中使用div,把table添加到div中间接实现。
MSDN 写道
The property is read/write for all objects except the following, for which it is read-only: COL, COLGROUP, FRAMESET, HEAD, HTML, STYLE, TABLE, TBODY, TFOOT, THEAD, TITLE, TR. The property has no default value.
DHTML expressions can be used in place of the preceding value(s). As of Internet Explorer 8, expressions are not supported in IE8 mode. For more information, see About Dynamic Properties.
Select元素的innerHTML也不能赋值,
IE6/7/8/9中Select的innerHTML不能赋值
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
但不抛异常。
相关:
http://msdn.microsoft.com/en-us/library/ms533897%28VS.85%29.aspx
https://developer.mozilla.org/en/dom:element.innerhtml
http://www.w3.org/TR/html5/apis-in-html-documents.html#dom-innerhtml
您可能感兴趣的文章:
- location.href 在IE6中不跳转的解决方法与推荐使用代码
- IE6-IE9中tbody的innerHTML不能赋值的解决方法
- IE6-IE9中tbody的innerHTML不能赋值的解决方法
- 引入JS文件IE6报语法错误或缺少对象问题的解决方法
- IE6下javasc#ipt:void(0) 无效的解决方法
- IE6中ajax aborted错误请求中断解决方法
- IE6-IE9不支持table.innerHTML的解决方法分享
- IE6下CSS图片缓存问题解决方法
- IE6不能修改NAME问题的解决方法
- IE6图片加载的一个BUG解决方法
- IE6支持position:fixed完美解决方法
- IE6浏览器中window.location.href无效的解决方法
相关文章推荐
- IE6-IE9中tbody的innerHTML不能赋值的解决方法
- IE6/7/8/9中Table/Select的innerHTML不能赋值
- IE6-IE9中tbody的innerHTML不能赋值的解决方法
- IE6-IE9中tbody的innerHTML不能赋值的解决方法
- LoadRunner不能启动 IE 浏览器 解决方法
- vue 数组和对象不能直接赋值情况和解决方法
- 解决 innerHTML 在 IE6-IE9中不能赋值的bug
- 关于IE中getElementsByClassName不能用的问题解决方法
- 解决ajax方法内部不能给方法外部变量赋值的问题
- 解决ajax方法内部不能给外部变量赋值的问题
- innerHTML中表单值不刷新在IE和火狐以及在在火狐当中outerHTML的解决方法
- 在沙箱中IE不能上网的解决方法
- WinXP SP2 IE不能使用cookie的解决方法
- IE下iframe第三方网页跨域不能写cookie问题的解决方法
- ie版本、秘钥长度、产品ID为空,导致不能运行Javascript的解决方法
- 解决IE9以下ie版本不能识别新元素的方法 添加一个js -- Shiv Solution
- 关于Jquery 异步Ajax回调函数中数据变量不能赋值给外部全局变量的原因分析及解决方法
- 百度ECharts图形在IE兼容模式中不能打开解决方法