<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; HTA: текстовое поле для выполнения находящегося в нём кода JavaScript]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=2245</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=2245&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «HTA: текстовое поле для выполнения находящегося в нём кода JavaScript».]]></description>
		<lastBuildDate>Wed, 17 Sep 2008 08:18:57 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[HTA: текстовое поле для выполнения находящегося в нём кода JavaScript]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=14110#p14110</link>
			<description><![CDATA[<p>Если в целях отладки и экспериментирования понадобилось выполнение некоторого кода JavaScript без перезагрузки всего документа, можно использовать такой HTA:<br /></p><div class="codebox"><pre><code>&lt;html&gt;
&lt;title&gt;console&lt;/title&gt;

&lt;HTA:APPLICATION 
     ID=&quot;JSConsole&quot; 
     APPLICATIONNAME=&quot;JSConsole&quot;
     SCROLL=&quot;no&quot;
     SINGLEINSTANCE=&quot;yes&quot;
&gt;
&lt;head&gt;
     &lt;script language=&quot;JScript&quot;&gt;
          function DebugConsole(ParentNode,r,c){
              //
              var textArea = document.createElement(&#039;TEXTAREA&#039;);
              textArea.setAttribute(&#039;id&#039;, &#039;console&#039;);
              textArea.setAttribute(&#039;rows&#039;, r);
              textArea.setAttribute(&#039;cols&#039;, c);
              textArea.setAttribute(&#039;value&#039;, &#039;alert(&quot;Пример использования, после нажатия кнопки OK, надпись изменится на Start&quot;); enter.value=&quot;Start&quot;&#039;);
              ParentNode.appendChild(textArea);
              //
              ParentNode.appendChild(document.createElement(&#039;BR&#039;));
              //
              var button = document.createElement(&#039;BUTTON&#039;);
              button.setAttribute(&#039;id&#039;, &#039;enter&#039;);
              button.setAttribute(&#039;value&#039;, &#039;Выполнить&#039;);
              button.attachEvent(&#039;onclick&#039;, ClcHandler);
              ParentNode.appendChild(button);
          }
          function ClcHandler(){
               eval(console.value);
          }
     &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
     &lt;script language=&quot;JScript&quot;&gt;
          DebugConsole(document.body,40,150);
          window.resizeTo(1280, 720);
     &lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (-red-)]]></author>
			<pubDate>Wed, 17 Sep 2008 08:18:57 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=14110#p14110</guid>
		</item>
	</channel>
</rss>
