JScript = JavaScript?

So would I go:

<script language="JavaScript">

Or

<script language ="JScript">

And would <script language ="JScript"> only work with people that the .NET Framework on a website?
 
Well, what I said about Javascript and JScript being the same may not be exactly true... it may vary from browser to browser -- Javascript is the Netscape implementation, and JScript is Microsofts, though I think in IE it doesnt make a difference. It might in other browsers. The two are very similar regardless.

Im also not familiar with the way JScript.NET works, myself. Ive just done a bit of reading on it, but it doesnt seem to say when JScript.NET is used. It looks like language="JScript" simply forces the browser to use the version of JScript installed, be it 5.5 or .NET.
 
you can use " javascript " in internet explorer and " netscape " , but JScript doesnt work on netscape as Voltface said. for example ....
C#:
// csharp seems the easiest code block to show java in.

// check if the browser being used is netscape or ie.
// works on both.
<script language ="javascript">
if(document.all)
{
window.alert("you are using internet explorer!");
}
else
if(document.layers)
{
    window.alert("you are using Netscape!");
}
</script>
but if you change the "javascript" to "JScript" , it works in ie , but not in netscape.
 
Most people say that Microsoft made JScript just becuase they wanted their own scripting language, not JavaScript which was first developed by Netscape :).
JScript is fully compliant with the scripting standards except minor exceptions for backward compatibility. So there is not much difference between the two, except some incombaptibilities with non-MS browsers.
 
Last edited by a moderator:
what gets me is , this article on msdn basically states that VBScript is in-compatible with netscape , but JScript is...
link to full article >JScript compatibilaty

Client
If you are planning to script HTML on the Internet and would like the "broad reach" of supporting both Netscape and Microsoft browsers, then your choice of languages is limited to JScript. Netscape does not support VBScript, so if you want to ensure that your page is viewable with modern browsers, you need to use JScript. Using JScript, however, does not guarantee that your script will work on all browsers, since there are many differences in HTML object-model conformance among the leading browsers. If you stick to features in HTML 3.2 (see the World Wide Web Consortium, or W3C, specification and ECMAScript (see the ECMA Standard, you should be okay.
 
Back
Top