<SCRIPT LANGUAGE="language" [SRC=url] >
<SCRIPT LANGUAGE="language" >
Any information going here will be seen (!) by non-Script-aware clients.
It is recommended that no information go here.
<!-- --> As a new convention, any information on these lines is
<!-- --> ignored by SCRIPT-aware clients.
<!--
Here goes information that will only be seen by
Script-aware clients. This is where the majority of script
functions should go
<!-- --> This construct also ends a Script block.
</SCRIPT>
|
<SCRIPT> .... </SCRIPT>.
Using comments prevents accidental display of SCRIPT code to non SCRIPT aware browsers.
<HTML>
<HEAD>
<SCRIPT LANGUAGE="NSL">
<!-
// generate some HTML just for kicks
function ack(i, j)
{
write("ack(" + i + ", " + j + ")<BR>")
if (i == 0) return j + 1
if (j == 0) return ack(i-1, 1)
return ack(i-1, ack(i, j-1))
}
// and execute.. normally you would use an event
write(ack(3,3))
->
</SCRIPT>
</HEAD>
<BODY>
You have just seen a printout of Ackerman's Function
</BODY>
</HTML>
|
|
<HTML>
<HEAD>
<SCRIPT LANGUAGE="NSL" SRC=checkNumber.NSL> </SCRIPT>
</HEAD>
<BODY>
<FORM ACTION="http://aubrey/form.html" METHOD="get">
Please enter a quantity:
<input
name=quantity
onClose="checkNumber(this.value, 1, 10, 'Enter a number between 1 and 10')"
value="0">
</FORM>
</BODY>
</HTML>
|