What language, other than JavaScript, can you use in the <script> tags of an html page, if any?
Printable View
What language, other than JavaScript, can you use in the <script> tags of an html page, if any?
The langauge attribute is actually depreciated in favour of the type="mime" attribute, but if this is what you mean I believe you can use...
type="text/javascript"
type="text/vbscript"
type="text/jscript"
the bottom 2 only in MSIE.
You can also use type="text/javascriptxx" where xx is javascript version.
I use <script langauge="javascript" type="text/javascript"> for compatibility in browsers.
Yeah and I seem to remember if a browser doesn't understand type or you've left out language then it should assume it's JavaScript.
yes you could also make it like this
<script language="php" src="http://www.yourhost.com/myscript.php"></script>
but it will only work on *nix systems as it won't on a windows system.
You can theorically use anything - the browser should determine what in supports
BTW, IE can also use "PerlScript" after its installed - and how to make your own ActiveX Scripting Langauge is documented at MSDN - it'll work with IE, ASP, and WSH.