Home  >  Article  >  Web Front-end  >  What is the difference between VBScript and JavaScript?

What is the difference between VBScript and JavaScript?

青灯夜游
青灯夜游Original
2019-03-08 13:24:297870browse

VBScript and JavaScript are both scripting languages, so what are the differences between them? The following article will help you understand the difference between VBScript and JavaScript. I hope it will be helpful to you. [Video tutorial recommendation: JavaScript tutorial]

What is the difference between VBScript and JavaScript?

What is VBScript?

VBScript is the abbreviation of Visual Basic Script, that is, Visual Basic scripting language; it is a visual basic script language because it is developed (modelled) based on visual basic; It is a lightweight scripting language with a fast interpreter and is easy to learn.

VBScript is a general-purpose scripting language developed by Microsoft, also known as active scripting language. It uses a common object model to access environment variables and file system objects for read, write, update, and delete operations. VBScript is only supported by the browser Internet Explorer and is primarily used in Microsoft environments and visual base language products.

Some differences between JavaScript and VBScript:

1. Differences in usage

JavaScript It is used for various operations on various website browsers, such as display ads on various websites, browser setting and reading cookies, shopping websites, and login page processing on almost all different browser websites. JavaScript is just a client-side scripting language.

VBScript is used in various applications such as embedded applications, human-machine interfaces. VBScript is both a client-side scripting language and a server-side scripting language.

2. Syntactic differences

JavaScript syntax is similar to the C programming language; it uses the same operators for different operations, such as operators for adding and concatenating, Case-sensitive languages.

VBScript syntax is similar to visual basic because it is developed based on Visual Basic and it follows the visual basic syntax for application development. It uses different operators for different operations, e.g. operator for addition, operator for concatenation, instead of case sensitive language.

3. Browser support

JavaScript is the default scripting language for most web browsers and supports almost all web browsers because it supports cross-platform. It can read and modify HTML elements from IE browsers, and can automate ActiveX components in the browser.

VBScript is not the default scripting language for browsers as it only supports Internet Explorer or Microsoft Edge browsers. We need to specify it as a scripting language. It can read and modify HTML elements from IE browser, and can automate ActiveX components in IE browser.

4. Function support

JavaScript is an object-oriented scripting language. It is not perfectly object-oriented and does not support the concept of inheritance. It supports powerful object usage and class declaration for later creation of objects, and does not support subroutines.

VBScript is also a partially object-oriented scripting language. It does not support the concept of inheritance, usage of objects, object creation, user-defined classes. It supports reusable functions and subroutines.

5. File extension

The file extension of JavaScript is .js; while the file extension of VBScript is .vbs or .vba.

The above is the entire content of this article, I hope it will be helpful to everyone's study. For more exciting content, you can pay attention to the relevant tutorial columns of the PHP Chinese website! ! !

The above is the detailed content of What is the difference between VBScript and JavaScript?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:What is vue scaffoldingNext article:What is vue scaffolding