Hello World: JavaScript

Posted by Joys of Programming on in JavaScript

JavaScript is useful to improve the layout of an HTML page giving the programmers to create a page of choice based on various parameters (dyanamically). A simple javascript function will look like

<head>
<title>Hello World in JavaScript</title>
</head>
<body>
<script type="text/javascript">
<!--
document.write("Hello World!");
-->
</script>
</body>

Now open your browser and enter the path where you have stored this file

file:///home/joysofprogramming/js/helloWorld.html

and the output will be displayed in the browser

Hello World!

Reblog this post [with Zemanta]


Tags:

Comments:

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Copyright © 2009-2012 Joys of Programming All rights reserved.
Desk Mess Mirrored v1.8.1 theme from BuyNowShop.com.