| InvisionFree Codes Part I (Javascript); Basic Javascript | |
|---|---|
| Tweet Topic Started: Aug 8 2006, 05:01 PM (881 Views) | |
| ari_aaron | Aug 8 2006, 05:01 PM Post #1 |
|
1a4
![]()
|
I am planning on writing a tutorial on InvisionFree Javascript (on flea1991's request), so here's the first part. Pretty simple. Ok, let's start. To test pages, I reccomend using W3Schools's test page, so you don't have to upload every time. First of all, all Javascripts have to be in <script> tags. Officaily, Javascript has to be in a tag that says
but <script> works just fine, and is much shorter. So, our first code:
So, Javascript revolves around object. The root object you will use the most is "document". This means "this page". So, this script makes the text that you give it print on the page. This is pretty useless, because we don't need javascript for that. However, Javascript can use varables, while HTML can not.
For those of us that can do basic addition (:P) that will output 9. Officaly, variables need to be declared at the beginning. e.g.
But, that is useless, and a waste of space. 1 last thing for now:
That makes a pop-up message. Also, I have just showed you how flexable JS (Javascript) variables are. Please post you comments! |
|
My msn: ![]() ![]() If anyone wants GMail or Windows Live Messenger invites, PM me! | |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Tutorials · Next Topic » |









3:20 AM Jul 11