Simple Hello World Javascript Code
Posted On Thu Sep 25, 2008 By hostman In Javascipt Forums And Other Related Topics Discussion About Javascript Progamming Forums
ok, so you want to start making javascript script. javascript is really fun because you can do alot of cool effects.
lets start my creating our first script.
i am using windows xp to write this tutorial, so open a blank notepad and copy and paste the following code into a blank notepad document
NOTE: if you dont have notepad, be sure to use an ascii text editor. dont use wordpad or a word process like word.exe, these programs format the text, and we dont want that. all microsoft windows come wint notepad, so you shouldn't use anything else.
JAVASCRIPT CODE:
<script language="javascript" type="text/javascript">
<!--
alert('Hello World Popup');
document.write('Hello Wallpaperama World! I wrote this message using javascript');
//-->
</script>
once you have copied and paste the code above, save it as: hello-world.html
now open hello-world.html with your browser, in my case, i am using internet explorer, but you can also use firefox if you prefer.
that's it, you will see your first script, the alert() function created the pop up you saw earlier, and the text on the browser was created by the document.write() function.
hope that helps
DEMO:
lets start my creating our first script.
i am using windows xp to write this tutorial, so open a blank notepad and copy and paste the following code into a blank notepad document
NOTE: if you dont have notepad, be sure to use an ascii text editor. dont use wordpad or a word process like word.exe, these programs format the text, and we dont want that. all microsoft windows come wint notepad, so you shouldn't use anything else.
JAVASCRIPT CODE:
<script language="javascript" type="text/javascript">
<!--
alert('Hello World Popup');
document.write('Hello Wallpaperama World! I wrote this message using javascript');
//-->
</script>
once you have copied and paste the code above, save it as: hello-world.html
now open hello-world.html with your browser, in my case, i am using internet explorer, but you can also use firefox if you prefer.
that's it, you will see your first script, the alert() function created the pop up you saw earlier, and the text on the browser was created by the document.write() function.
hope that helps
DEMO:
Related Content
Information
Forums »
Javascipt Forums And Other Related Topics Discussion About Javascript Progamming »
Simple Hello World Javascript Code
Javascipt Forums And Other Related Topics Discussion About Javascript Progamming »
Simple Hello World Javascript Code
Title: Simple Hello World Javascript Code
Description: this is a simple hello world javascript script with code to show you how to create and make a simple hello world script using javascript for your broswer on the web
Tags: javascript , create , make , hello world , beginner , newby , howto , sample , example , code , script , download , free , tutorial , guide
Info: This Post Has Been Viewed 0 Times Since
Date: Thu Sep 25, 2008
Author hostman Received 0 Replies #806
Date: Thu Sep 25, 2008
Author hostman Received 0 Replies #806
Share
URL: 

Embed: 

To embed this topic, just copy the code from the "Embed" box. Once you've copied the code, just paste it into your website or blog to embed it
BBCODE:: 

BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums
wallpaperama | Wallpapers | Forums | Terms Of Service
copyright © 2013 wallpaperama - All Rights Reserved - Last Updated Mon May 06, 2013 (-8 GMT)
Powered by: Webune Forums V5
copyright © 2013 wallpaperama - All Rights Reserved - Last Updated Mon May 06, 2013 (-8 GMT)
Powered by: Webune Forums V5