Генерация скрипта
Можно ли генерировать JS в новом окне? Если можно, то какой синтаксис?
|
Добавьте <script> или выполните eval
|
Беда собственно в том, что оператор в стр.17 закрывает скрипт в стр. 0
0.<script type="txt/javascript"> 1.function ow() 2.{ 3.var OpenWindow=window.open("", "vl1", "height=500px,width=1000px,scrollbars=1,resizable= 1"); 4.OpenWindow.document.write("<HTML>"); 5.OpenWindow.document.write("<HEAD>"); 6.OpenWindow.document.write("<TITLE>Новое окно</TITLE>"); 7.OpenWindow.document.write("<link href='img.css' rel='stylesheet' type='text/css'>"); 8.OpenWindow.document.write("</HEAD>"); 9.OpenWindow.document.write("<BODY BGCOLOR='white'>"); 10.OpenWindow.document.write("<center>"); 11.OpenWindow.document.write(" <img width='744' height='620' src='pic/Vladimir/01.bmp'>") 12.OpenWindow.document.write("</center>"); 13.OpenWindow.document.write("</BODY>"); 14.OpenWindow.document.write("</HTML>"); 15.OpenWindow.document.write("<script type='text/javascript'>" ); 16.OpenWindow.document.write("alert('mom')") 17.OpenWindow.document.write("</script>"); 18.} 19.</script> |
write("</sc" + "ript>")
|
Получилось! Спасибо.
|
Часовой пояс GMT +3, время: 07:17. |