开发者

Weird eval() in IE7

开发者 https://www.devze.com 2023-01-04 04:00 出处:网络
I have the following code: eval($(this).text()); Now this.text() contains about 50 lines of JS with \'\'s and \"\"\'s and 开发者_StackOverflowvarious JS code.

I have the following code:

eval($(this).text());

Now this.text() contains about 50 lines of JS with ''s and ""'s and 开发者_StackOverflowvarious JS code.

Now, FireFox, Safari and Chrome have no problem executing this code. However, IE7 reports:

Error: Expected ')' Code: 0

Now, I assume this is some "",'' or (), ie syntax problem... however, I can't reproduce this in smaller code base. Everything I try seems to works in IE7 and FF (& friends).

Any suggestions? Thanks in advance,

0

精彩评论

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