createElement error in IE8

前端 未结 1 1741
南笙
南笙 2021-01-26 11:46

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

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

Error :

1条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-26 12:23

    Changed the line to

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

    and it works. funny.

    0 讨论(0)
提交回复
热议问题