How to call a function in javascript without HTML?
<p>This is the function</p>

<pre><code>function seeHTML(elem){
var htmlTxt=document.getElementsByTagName('html')[0].innerHTML.toString();
elem.value=htmlTxt;
}
</code></pre>

<p>to call i use HTML</p>

<pre><code>&lt;input type="button" value="See HTML" onclick="seeHTML(txt)"&gt;
</code></pre>

<p>how to call it from another function as document.write</p>

<pre><code>document.write(seeHTML(txt));
</code></pre>

<p>-- im a javascript begginer</p>

<p>however i tried document.write but it prints the function data itself, it doesnt use the function, how to ask it to use it then print the return (result)</p>
