Scripting Language
- A scripting or script language is a programming language that supports scripts:
- programs written for a special run-time environment that automate the execution of tasks that could alternatively be executed one-by-one by a human operator.
- Scripting languages are often interpreted rather than compiled. Scripts executed automatically in Web Browsers.
- Different Scripting Languages are
- Javascript
- Vbscript
VBScript
|
JavaScript
|
VBScript (Visual Basic Script) is
the Active Scripting Language ,
lightweight & designed for fast interpreter .
|
JavaScript is the Client side scripting language,
prototype based and mostly used with web browsers.
|
Microsoft Developed
VBScript.
|
Brendan
Eich founded JavaScript and NetScape Developed
it.
|
VBScript works at both client side
and server side.
|
JavaScript works only at client side.
|
VBScript is not case
sensitive language.
|
JavaScipt is case sensitive language.
|
It runs only on Internet Explorer (IE)
browser.
|
It runs on the all browser.
|
VBScript is used for server side
validation.
|
JavaScript is used for client side
validation.
|
VBScript supports functions &
subroutines and uses functionand end function for
starting and ending function.
|
JavaScript supports only functions and
uses curly bracesfor
starting and ending function.
|
VBScript Syntax is derived from BASIC language .
|
JavaScript syntax is derived from C language.
|
VBScript is not the default scripting language ,
but can be made by specifying in scripting language.
|
JavaScript is default scripting
language almost in all browsers.
|
File extension in VBScript is .vba or .vbs
|
File Extension in JavaScript is .js
|
VBScript Uses ‘ for comment.
|
JavaScript uses // or /* … */ for
comments.
|
First.html
- Java Script for Multiplication of Two
Numbers using Function
<html>
<body>
<p id="result"></p>
<script>
var x = Multiply(4, 3);
document.getElementById("result").innerHTML = x;
function Multiply(a, b)
{
return a * b;
}
</script>
</body>
</html>
VBScript Programm to Add Two Numbers
<html>
<head></head>
<body>
<script
language="vbscript" type="text/vbscript">
Dim Sum
Number1 =
InputBox ("Please enter the number 1")
Number2 =
InputBox ("Please enter the number 2")
Sum = Number1
+ Number2
Msgbox Sum
</script>
</body>
</html>
VBScript to
Display Welcome Message
<html>
<head></head>
<body>
<script
language="vbscript" type="text/vbscript">
Msgbox “Welcome
Message”
</script>
</body>
</html>