About Me
Search
Sanjula Lakpahana. Powered by Blogger.
Popular Posts
Categories
- Java (2)
- JavaScript (2)
- VB 6 (3)
Saturday, February 23, 2013
JavaScript- Making your First application
JavaScript with HTML
You have to use JavaScript with HTML if no you cannot run it in browser.When using Javascript with HTML following is the structure of code,
<script type="text/javascript'>
YOUR JAVSCRIPT CODE
</script>
You can use Microsoft Notepad for coding Javascript. You can open notepad by Start-->All programs --> Accessories --> Notepad
First Program
Write following code in notepad
<html>
<head>
<title> MY FIRST JAVSCRIPT PROGRAME!</title>
</head>
<body>
<script type="text/javascript">
alert("Hello World!");
</script>
</body>
</html>
like this
And go to Save as in file menu and choose name for your program and if you choose the name as first then you have to add .html at last like this first.html.After that choose file type as All files Save in a folder.
Then open it from the place you saved.Run it in browser and if you coded right it will run like follows,
if you have problem comment.See in next post . Bye :D
Labels:
JavaScript
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment