Fixing “unknown runtime error” in IE8 [closed]

北慕城南 提交于 2019-12-20 08:06:32

问题


I don't see anyone else really trying to accomplish what I am... LOADS of people want to replace some node via innerHTML property however, I not only want to do this but I ALSO want to replace it with javascript.

Here is my example script which is working fine in all versions of Firefox: http://syn4k.site90.net/working_test/ EDIT: If the above link does not work, try this one: http://www.syn4k.freehosting.com/working_test/

You will note that it is NOT working in IE8. I'm guessing it is not working in any version of IE...

The process I have created at the link is simple: 1. The user clicks to being the process. 2. A new window is opened. 3. Data from the new window is sent back to the opener and inserted into the DOM. 3.note. The data being sent back is javacript and should execute as it does in Firefox.


回答1:


I got a look before your hosting went dowm; You cannot set innerHTML of a script node in IE, instead you need to newdiv.text = your_string_with_js; (or append a createTextNode() to it).



来源:https://stackoverflow.com/questions/7892102/fixing-unknown-runtime-error-in-ie8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!