1997
Библиотека JAVASCRIPT SE@RCHER
Библиотека JAVASCRIPT SE@RCHER
Библиотека JAVASCRIPT SE@RCHER
вставить HTML-код
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1251" /> <title>Текстовое поле с просмотром и изменением кода</title> <style type="text/css"> button:hover{border: 2px solid green; color:#CCC;background: #FEFFA9; text-shadow: #000 1px 2px 0, #000 1px 2px 0, #000 1px 2px 0, #000 1px 2px 0, #000 1px 2px 0;height: 2em;filter:Shadow(Color=#000000,Direction=135,Strength=4); } button{font-weight:bold;border: 2px solid #CCC; padding: 4px; border-radius: 8px; background: #0076A3; color:#FFF; text-shadow: #000 1px 2px 0, #000 1px 2px 0, #000 1px 2px 0, #000 1px 2px 0, #000 1px 2px 0;height: 2em;filter:Shadow(Color=#000000,Direction=135,Strength=4); } div.f13{position:absolute; width:80px; height:97px; z-index:1;; top: -40px;left:-40px} div.f14{text-align:center;margin-left:40px;margin-top:20px} div.f15{margin-left:30%;margin-top:20px} span.f13{font-weight:bold;padding-left:40px;color:#FFF;text-shadow: #000 1px 2px 0, #000 1px 2px 0, #000 1px 2px 0, #000 1px 2px 0, #000 1px 2px 0;height: 2em;filter:Shadow(Color=#000000,Direction=135,Strength=4);} span.f14{font-size:120%;font-weight:bold} h1.f13{text-align:center;width:90%; font: bold 2em Arial, sans-serif;color: #FFCC66; text-shadow: #000 1px 2px 0, #000 1px 2px 0, #000 1px 2px 0, #000 1px 2px 0, #000 1px 2px 0;height: 2em;filter:Shadow(Color=#000000,Direction=135,Strength=4); line-height: 1em; white-space: normal;} table.f13{width:98%;border:solid 1px #000; padding: 4px; border-radius: 8px;} iframe.f13{height:310px;width:96%;border:solid 1px #b9b8b6;background:#fffff;margin-left:20px} textarea.f13{border:solid 1px #b9b8b6;padding:5px;width:100%; height:300px;scroll:auto;} </style> </head> <body onkeypress="test(event)" onload="preview.document.write (document.getElementsByTagName ('textarea')[0].value); preview.document.close(); preview.focus(); "> <div align=center> <button onclick="preview.document.write (document.getElementsByTagName ('TEXTAREA')[0].value); preview.document.close(); preview.focus()">изменить</button> <button onclick="window.document.form1.code.value='';preview.document.write (document.getElementsByTagName ('TEXTAREA')[0].value); preview.document.close(); preview.focus()">очистить все</button> <button onclick="window.location.href=window.location.href">перезагрузка</button> <button onClick="viewPage3();">просмотр</button></div><br><br> <table class="f13"> <tr><td valign="top" style="text-align:center">вставить HTML-код<br> <form name="form1" method="post"> <textarea name="code" wrap="soft" onclick="focus(this.code)" cols="30" class="f13" id="pre_code"> </textarea></form></td><td valign="top" style="text-align:center">результат<br> <iframe src="about:blank" name="preview" class="f13" frameborder="0" id="viewIFRAME"> </iframe></td></tr></table> <script type="text/javascript"> function resizeHeight(elmnt) {if(window) {var x=window.innerHeight if(x) {var y=(x-205);if(y>400) {document.getElementById("pre_code").style.height=y+"px";document.getElementById("viewIFRAME").style.height=y+"px";}}}} resizeHeight() window.onresize=function(){resizeHeight()} function viewPage3(){day=new Date();id=day.getTime();eval("javascript:view=window.open('','newWin','width=1000px,height=600px,left=0,top=0,toolbar=No,location=Yes,scrollbars=Yes,status=Yes,resizable=Yes,fullscreen=Yes'); view.focus(); setTimeout('view.close()',482000); void(0);");view.document.open() view.document.write('<html><meta http-equiv="Content-Type" content="text/html;charset=windows-1251"><title>Библиотека Javascript SE@RCHER</title><sc'+'ript>window.moveTo(0,0); window.resizeTo(screen.width,screen.height)</sc'+'ript><body><LINK href="https://www.03www.ru/button.css" rel="stylesheet" type="text/css"><style type="text/css">html {margin:0;padding:0;width:98%;height:100%;}body {margin:0;padding:0;width:100%;height:100%;}</style><button onClick="window.close(self)"><b>ЗАКРЫТЬ</b></button><br>') view.document.write(document.forms[0].elements[0].value) view.document.close()}</script> </body> </html>
результат
просмотр
очистить все
перезагрузка
отд.окно
.
Библиотека JAVASCRIPT 1997- Дизайн и сопровождение © SE@RCHER