Possible duplicate:Why break the <script> tag when writing it using document.write ()?
I often saw the following statement:
document.write("<scr"); document.write("ipt language=\"Javascript\" type=\"text/javascript\" src=\"source url\"></scr"); document.write("ipt>");
What is the advantage of this? Why don't people write the whole script as shown below?
document.write("<script ");
This may help you:
http://www.webmasterworld.com/forum91/2913.htm
Depending on the browser, the number of other previous javascript, and how well the general code is formed, is done to prevent the analyzer from interpreting and tags as executable code and not as a string that needs to be written., , script script.
Depending on the browser, the number of other previous javascript, and how well the general code is formed, is done to prevent the analyzer from interpreting and tags as executable code and not as a string that needs to be written.
, , script script.
, , , .
CDATA:
STYLE SCRIPT CDATA , CDATA - . . "</" ( ) . .
STYLE
SCRIPT
</
</ :
document.write("<script language=\"Javascript\" type=\"text/javascript\" src=\"source url\"><" + "/script>");
. , , , , <script> .
<script>
.
, script?
:. , , , .
, , <!-- <script> blargh </script> //-->
<!-- <script> blargh </script> //-->
, - , script . - "<script", , .
<script
, -.
Source: https://habr.com/ru/post/1756721/More articles:How to create a static background image in an OpenGL scene (GLUT)? - c ++https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1756717/email-sent-using-contact-form-displays-admins-from-address-and-not-the-visitors-email&usg=ALkJrhg8HeUJa9_APO-C550GH-h-ZJFp_AHow do video games get on my screen? - language-agnosticHow to pass a string array to an external DLL? - delphiSave the contents of a YAML emitter to a file using YAML-CPP - yaml-cppCXF SSL secure Web service client with multiple certificates - javaiPhone Sdk: [MobileOfferViewController _shouldUseKeyWindowStack] - memory-leaksGroovy Список Проблемы с параметрами: + = не работает, но .add() делает - groovyXmlSerializer throws an InvalidOperationException when there is a namespace prefix in the attribute - c #How do you get / install content via javascript using the AJAX Control Toolkit HTML editor? - ajaxcontroltoolkitAll Articles