JSCRIPT:

JScript is Microsoft's implementation of an ECMA-compliant scripting language (like JavaScript) that is targeted specifically to the Internet. Like VBScript, JScript is implemented as a fast, portable interpreter for use in Web browsers and applications that use ActiveX controls, Java applets, and OLE Automation servers. JScript is not Java and has nothing to do with Java. It is closer in syntax to C or C++. If you are a C or C++ developer, you will probably find JScript to be a very easy scripting language to learn (I know I did).

Also like VBScript, JScript supports three separate classes of objects for use within JScript:

Objects provided by the JScript engine
Objects provided by Internet Explorer (found in the Microsoft Scripting site
Objects provided by the Web page author via the HTML <OBJECT> tag.

Advantages

  1. Broad reach. JScript is pretty much guaranteed to run in any browser, anywhere. If your page really must work in any browser, this is the language for you.
  2. All those books in the bookstore. How many books can there be? If you want to learn JScript, there are myriad books to help you.
  3. Similarity to C and Java. If you are a C or Java programmer, the JScript syntax is going to be familiar to you.

Language features:

  1. Dynamic: JScript was designed as a completely dynamic language; that is, you can effectively redefine your program on the fly. While this has a number of potential disadvantages, it does give you the ultimate flexibility in your scripts. This is particularly useful in DHTML programming, since DHTML allows you to dynamically manipulate the object model. If you really want to drive DHTML, you might want to consider using JScript instead of VBScript.
  2. Object oriented: JScript certainly isn't a traditional class-based, object-oriented language, but it does provide an effective alternative based on prototypes. This allows you to reap the benefits of object orientation without the statically defined nature of classes.
  3. Regular expressions: A main reason why Perl has such a huge following. Regular expressions add the ability to search for expressions in strings. This is exceptionally useful on the server and, increasingly, on the client.
  4. Eval: Provides the ability to immediately evaluate code at runtime. This allows you to dynamically redefine logic dependent at run time. This is especially useful when used in conjunction with Remote Scripting, which works with VBScript as well.

Examples from microsoft:

Example 1: Hello World

The Hello World Non-MSDN Online link example is the bare-bones JScript example. It provides a button that, when clicked, displays a message box with the text, "Hello, world!"

<CENTER>
 <P>
 <H2>Hello, world sample</H2>

 <FORM Name="Form1" ACTION="">
 <INPUT TYPE=BUTTON VALUE="Click me"
  NAME="BtnHello"
  OnClick="sayhello()"
 >
 </FORM>

</CENTER>

<SCRIPT LANGUAGE="JavaScript">
<!--

    function sayhello ()
    {
        alert("Hello, world!")
    }

//-->
</SCRIPT>

 

Here again, HTML code is used to set up the button and JScript is used to perform an action (displaying the message box using the alert function) when the button is clicked.

Example 2: Client-Side Validation

The second Ordering Flowers Non-MSDN Online link example demonstrates client-side validation using JScript. As in the VBScript example, this example uses radio buttons to enable the user to choose which type of card to include with the flowers, text input fields to gather information on where to send the flowers, and a button to submit the request. The HTML source code is the same for this example as it is for the VBScript example, so I won't show it here. What is different, however, is the script. The following JScript code is used to do client-side validation:

 

<SCRIPT LANGUAGE="JavaScript">
<!--
 var bValidOrder
 var f = document.form1

 function Init()
 {
  var d
  document.form1.TxtName.value = "Joe Smith"
  document.form1.TxtAddress.value = "1 Main Street"
  document.form1.TxtCity.value = "Springfield"
  document.form1.TxtState.value = "Washington"
  document.form1.TxtZip.value = "12345"

  d = new Date()
  d.setDate(d.getDate() + 3)
  f.TxtDate.value = (d.getMonth() + 1) + "/" + d.getDate() +
   "/" + d.getYear()
 }

 function SubmitOrder()
 {
  bValidOrder = true

  CheckSpecified(f.TxtName.value,"Please specify a name.")
  CheckSpecified(f.TxtAddress.value,"Please specify an address.")
  CheckSpecified(f.TxtCity.value,"Please specify a city.")
  CheckSpecified(f.TxtState.value,"Please specify a state.")
  CheckSpecified(f.TxtZip.value,"Please specify a zip code.")
  CheckSpecified(f.TxtDate.value,"Please specify a date.")

  ValidateDeliveryDate()

  if (bValidOrder)
  {
   alert("Thank you for your order!")
   // TODO:  Actually send the order.
  }
 }

 function ValidateDeliveryDate()
 {
  var SoonestWeCanDeliver
  var RequestedDate
  var t

  if (bValidOrder)
  {
   SoonestWeCanDeliver = new Date()
   SoonestWeCanDeliver.setDate(SoonestWeCanDeliver.getDate() + 2)
   t = Date.parse(f.TxtDate.value)
   RequestedDate = new Date()
   RequestedDate.setTime(t)

   if (RequestedDate.getTime() < SoonestWeCanDeliver.getTime())
   {
    bValidOrder = false
    alert("Not even we can deliver that fast!")
   }
  }
 }

 function CheckSpecified(strFieldValue, strMsg)
 {
  if (strFieldValue == "")
  {
   if (bValidOrder)
   {
    alert(strMsg)
    bValidOrder = false
   }
  }
 }

 function Clear()
 {
  f.TxtName.value = ""
  f.TxtAddress.value = ""
  f.TxtCity.value = ""
  f.TxtState.value = ""
  f.TxtZip.value = ""
  f.TxtDate.value = ""
 }
//-->
</SCRIPT>

Links For further details please check

Microsoft JScript Page

JScript FAQ