开发者

why window.setTimeout is required to set an iframe's designmode "on" in IE

In my experiment, I have seen that even after window.onload event, window.setTimeout is required to make an iframe editable by setting iframe's designmode "ON". And this happens in IE, while in Firefox window.setTimeout is not required. I have not tested in any other browser.

Is it necessary to use window.setTimeout to set an iframe's designmode "ON" in IE?

You can try it from here, http:/开发者_如何转开发/www.nazmulweb.com/site5/demo/iframe/Default.aspx


You should set the designmode='on' when iframe is loaded.


You might be better off setting the contentEditable property of the iframe's <body> to true instead, which I think will work immediately. I've done that in WYSIWYG editors I've written, although now I can't remember why. I'm pretty sure I had decent reasons.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜