开发者

Replace contents of a script block using jQuery

开发者 https://www.devze.com 2023-01-13 13:50 出处:网络
I\'ve a script block in HTML which basically has some JSON content. I would like to replace contents inside it using jQuery. I did something like this:

I've a script block in HTML which basically has some JSON content. I would like to replace contents inside it using jQuery. I did something like this:

$("#data").html(newj开发者_JAVA技巧son);

Above statement only works with Firefox. It does not work with IE? How do I make this work in IE.


Have a try removing the script element and adding a new one with your new json.

0

精彩评论

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