Practical 1
Practical 1
Institute,………………………………………………………………………………………………………
Client Side Scripting languages (22519) for the academic year ………………… to
Seal of Institution
Client Side Scripting Languages (22519)
o simple syntax
JavaScript How To
– The HTML <script> tag is used to insert a JavaScript into an HTML page
<script type=“text/javascript”>
</script>
o Optional; required when you want to put multiple statements on a single line
JavaScript can be inserted within the head, the body, or use external JavaScript file
<script type=“text/javascript”>
<!—
document.write(“Hello World!”)
// -->
</script>
JavaScript Variables
<html>
<head>
</head>
<script language="text/JavaScript">
document. write("Hello World!");
alert("Error");
</script>
</html>
Output:
<html>
<head>
</head>
<script language="text/JavaScript">
var a = 10;
var b = 20;
</script>
</html>
Output:
Questions:
1. Which company developed JavaScript?
-> Brendan Eich, a software engineer at Netscape Communications, developed JavaScript in 1995.