开发者

why break this up javascript fragment? [duplicate]

开发者 https://www.devze.com 2023-01-10 23:53 出处:网络
This question already has answers here: Closed 12 years ago. Possible Duplicate: Why split the <script> tag when writing it with document.write()?
This question already has answers here: Closed 12 years ago.

Possible Duplicate:

Why split the <script> tag when writing it with document.write()?

I don't really do Javascript programming and was hard to google this but have seen something like this in a couple of different places 开发者_JAVA百科(by good developers):

document.writeln('<scr'+'ipt src="'+pcheck+'" type="text/javascript"></scr'+'ipt>');

With the split always between the r and the i. What does this achieve?


This is to prevent any script blockers from loading this script, because they cannot find the "script" word within the text.

0

精彩评论

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