JRS: In article <3f********@olaf.komtel.net>, seen in
news:comp.lang.javascript, Martin Honnen <ma*******@yahoo.de> posted at
Wed, 29 Oct 2003 16:36:10 :-
Volker Hetzer wrote: I'm new to javascript and I'd like to know whether javascript can
process javascript-code entered by the user or read from a file.
Yes, the function
eval
takes a string with JavaScript source code as its arguments and
evaluates the code.
And <URL:http://www.merlyn.demon.co.uk/js-quick.htm> does just the
former that, when the Eval button is pressed.
H'mmm - it can read from a file, too, if one enters something like
<script type="text/javascript" src="include1.js">
</script>
<script type="text/javascript">
document.write(LZ(3))
</script>
and presses HTML. Function LZ is supplied by include1.js.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> JS maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/JS/&c., FAQ topics, links.