HTML JavaScript

You can insert JavaScript code in an HTML document by using the script element. When an HTML document with the SCRIPT element is loaded in a Web browser, the browser process the content enclosed within the SCRIPT element as a JavaScript code.

JavaScript is a client side scripting Language developed by Netscape communications Corporation,
first released in may 1995.

How to write HTML JavaScript :-

<html>
<head>
<title> Javascript programming Language</title>
<script type=”text/javascript”>
document.write(“<h1>hello, tutorialworld.in</h1>”);
</script>
</head>
<body>
<p>java script is a Client side scripting Language.</p>
</body>
</html>

 

Result of HTML JavaScript:-

java script Example

 HTML JavaScript Example of variable :-

<html>
<head>
<title> Javascript programming Language</title>
<script type=”text/javascript”>
document.write(“<h1>hello, tutorialworld.in</h1>”);
var a=23,b=45,c;
c=a+b;
document.write(“The total of two variables”+c);
</script>
</head>
<body>
<p>java script is a Client side scripting Language.</p>
</body>
</html>

 

 HTML JavaScript Example of variable result:-

java script variable

 




Follow Us

Contact Us

tutorialworldin@yahoo.com

Back to Top