|
<SCRIPT ...>TYPE = "text/javascript" | "text/vbscript" | other scripting language| Usage Recommendation |
|---|
TYPE<SCRIPT ...>TYPEtext/javascript, which indicates that the script is written in JavaScript. Other possible values are
text/vbscript for VBScript (which only supported by MSIE) or
text/tcl for Tcl (a great language but not well supported at all).
The following example creates a small JavaScript script that outputs the current time:
<SCRIPT TYPE="text/javascript">
<!--
document.write("<P>right now: " + new Date() + "<P>");
//-->
</SCRIPT>
which gives us:
Copyright 1997-2002 Idocs Inc. Content in this guide is offered freely to the public under the terms of the Open Content License and the Open Publication License. Contents may be redistributed or republished freely under these terms so long as credit to the original creator and contributors is maintained.