createElement error in IE8

前端 未结 1 1756
野趣味
野趣味 2021-01-26 11:56

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:20

    Changed the line to

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

    and it works. funny.

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