📜  JavaScript 和 VBScript 的区别

📅  最后修改于: 2021-09-11 04:18:47             🧑  作者: Mango

JavaScript是一种轻量级的面向对象的脚本语言,用于在网页中创建具有交互效果的动态 HTML 页面。它是一种解释性脚本语言,其代码仅在 Web 浏览器中运行。它也被称为浏览器语言,可用于客户端开发和服务器端开发。它由Netscape 的 Brendan Eich开发,并于 1995 年首次发布。
JavaScript 示例:

Javascript


Javascript


VBScript是 Microsoft 推出的一种主动脚本语言。它是基于 Visual Basic 开发的,也称为 Visual Basic 脚本语言。它不支持所有浏览器,仅支持 Internet Explorer。它一般用于微软环境,使用组件对象模型来访问系统对象和环境变量。
VBScript 示例:

Javascript

 

JavaScript 和 VBScript 的区别:

S.No. JavaScript VBScript
1. It was developed by Netscape. It was developed by Microsoft.
2.. It does job as a client-side scripting language. It does job as both server-side and client-side scripting language.
3. It supports all web browsers and it is a default scripting language in mostly browsers. It does not support all browsers, supports only Internet Explorer.
4. It uses the same operator for various operations. While it uses different operators for various operations.
5. It uses curly braces for declaration of functions. It uses Function and End function for declaration of functions.
6. JavaScript file has the file extension “.js”. VBScript file has the file extensions “.vbs” or “.vba”. 
7. It is simpler and easier to learn JavaScript. It is difficult for beginners to learn VBScript as compared to JavaScript.