createElement error in IE8

坚强是说给别人听的谎言 提交于 2019-12-02 18:21:22

问题


I am getting the follow error on the following line in IE8 ( not in IE9 or chrome or firefox )

popup = document.createElement('div');

Error :

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB7.1; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729)
Timestamp: Fri, 5 Aug 2011 13:39:41 UTC


Message: Object doesn't support this property or method
Line: 72
Char: 5
Code: 0
URI: http://192.168.7.1/fquick/script.js

How do I go about it?


回答1:


Changed the line to

var popup = document.createElement('div');

and it works. funny.



来源:https://stackoverflow.com/questions/6957249/createelement-error-in-ie8

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