![](/img/trans.png)
[英]How to add a property in the DOM Object's constructor.prototype in Internet Explorer<=IE8?
[英]How to add contentEditabled div with prototype in IE8
我有以下代码:
<form action="/fake" >
<div id="root">
</div>
</form>
<script type="text/javascript">
var root = Element.extend($("root"));
function addTextControl()
{
var textCtl = new Element('div', { 'contenteditable': 'true'}).update("Next page");
root.appendChild(textCtl);
};
addTextControl();
</script>
它在FF和Chrome中完美运行,但在IE8中没有:-(。它有什么问题?
先感谢您
您认为这是套管问题吗?
试试这个:
new Element('div', { 'contentEditable': 'true'})...
注意contentEditable中的大写字母E。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.