How to Run Javascript First Program
Example
“Welcome to PHPGurukul!” program:
Open Notepad, write JavaScript codes as follows:
<html>
<head>
<title>
The first JavaScript Program
</title>
<head>
<body>
<script language="javascript">
document.write ("<h2>Welcome to PHPGurukul! </h2>")
</script>
</body>
</html>
Please save the file with name “JavaScriptFirstProgram.html”.
Double click “First JavaScript.html” file, the ” JavaScriptFirstProgram.html” will be run in a browser, and see the output.
Welcome to PHPGurukul!
Explanation
document.write ("<h2>Welcome to PHPGurukul! </h2>") the output will be Welcome to PHPGurukul!
