Script header question
I've noticed some web sites that use script (Java script I assume) use different tags to surround the script code.
For example:
<script>....</script>
<script language="Javascript">....</script>
<script language="Javascript1.2">....,/script>
etc.
(I assume this is all Java script.)
What is the difference (if any)?
Thanks!
------------------
ArtsNFlies.com
Original art, hand tied flies, unique books and gifts, free sweepstakes and MORE!
Anonymous posted this at 01:31 — 29th November 1999.
They have: 5,633 posts
Joined: Jan 1970
There are different features available for the different JavaScript versions. I don't know what these differences are. You could try searching at Netscape or Microsoft.
Whenever I use the <SCRIPT> tag I just use <SCRIPT LANAGUAGE="JavaScript">. It works for me.
------------------
http://go.to/hass
John Pollock posted this at 04:24 — 29th November 1999.
He has: 628 posts
Joined: Mar 1999
The <SCRIPT><SCRIPT>
is usually just assumed as JavaScript, though it could mean just any scripting language follows (VBScript etc.)
Adding the language="JavaScript" specifies what language, so to use VBScript you have to add language="VBScript" otherwise it will likely be assumed as a JavaScript.
The addition of the 1.x stuff at the end is just like Lloyd said, the different versions offer support for different features. It is supposed to keep a script written for a higher version from working in a browser supporting a lower version (though some of those browsers do not support the number in the attribute anyway!)
Java Script: A Beginner's Guide
Page Resource
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.