Basics: The difference between JavaScript, Jscript, VBScript, ASP

Source: Internet
Author: User
Tags client
Javascript|js|jscript|vbscript| Difference

A lot of people are confused by these nouns, here is a summary, thoroughly clarify these concepts.

Javascript

JavaScript was first developed by Netscape, the original name LiveScript, which was designed in part by Java, and the Java language was so hot that it was soon renamed JavaScript. Netscape implemented the language on its Netscape browser and applied it to client development.

Jscript

Here we have to mention a Microsoft product VBScript, its syntax is strange (for Java programmers), lack of OOP concept support, and other reasons, resulting in VBScript not hit, So the rich and rich Microsoft modeled on the new client language JavaScript to create their own JScript, hoping to seize the market. For now, JavaScript is almost indistinguishable from JScript.

VBScript

As mentioned above, VBScript is a Microsoft product and is initially used for client development. Later, with the concept of dynamic scripting (ASP out), Microsoft implemented the concept of dynamic scripting with its own JScript two languages.

Asp

The ASP full name is Active Server Page, which is a technology rather than a language, and most ASPs now use VBScript, and the server IIS default language is VBScript. Since there is a default language, it means that there is a non-default language, and yes, JScript, as mentioned earlier, JScript can also be applied to the server, or even a complete replacement for VBScript, operating databases, and so on.
This means that VBScript and Jscript two scripting languages can be applied to both the client and the server. Take a look at the following example:
<script language= "VBScript" >
<!--
Client Script vbs
Response.Write "Demo Text ..."//case-insensitive, syntax fairly loose
-->
</script>

<script language= "Javascript" >
<!--
Client Script JS
document.write ("Demo text ...")//built-in objects must be case-sensitive
-->
</script>

<script language= "VBScript" runat= "Server" >
<!--
Server-side script vbs
Response.Write "Demo Text ..."//case-insensitive, syntax fairly loose
-->
</script>

<script language= "javascript" runat= "Server" >
<!--
Server-side Script JS
Response.Write ("Demo text ...")//asp built-in objects must be case-sensitive-->
</script>
Or:
<% @LANGUAGE = "JavaScript"%>//on the first line of the server-side page, which means that the page defaults to using JAVASCRIPT script and uses <% ' code...%> elsewhere on the page; The interpreter thinks this is the first line of language defined
<% @LANGUAGE = "VBSCRIPT"%>//on the first line of the server-side page, indicating that the page uses VBSCRIPT script to use <% ' code...%> elsewhere on the page, which the interpreter considers to be the first line of defined language

Additionally,. vbs and. JS can also be run by the Window Script Host (WSH)



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.