1. Notepad (Notepad++ recommended)
2. Basic knowledge of Html coding
What is Html? Html, Hypertext Markup Language is markup language for web pages that provides a means to create structured documents by denoting structural semantics for text such as headings,links, quotes and other items.
What is Java Script? What Java Script is, is a programing scripting language that you put right in your website to make it more interactive and dynamic.
How do i get Started? First off you want to make a folder on your desktop and create a new text document, right click text document and rename the document to " index.html ", then open it with notepad and your ready to put some code in.
Beginning Script: Add a Beginning script before you start adding code[html]<script>
</script>[/html]This may not work for all browsers so to be safe add this
[html]<script type="text/java script"> // no space between java script
</script>[/html]
Writing Text: Adding in text
[html]<script type="text/java script">
document.write("Text message"); // For numbers you don't need ""
</script>[/html]
Alert Box:[html]<script type="text/java script">
Alert("This is a Alert box");
</script>[/html]
Variables: Supporting a value[html]<script type="text/java script">
var n1="50";
var n2="40";
var answer=(n1+n2);
alert(answer);
</script>[/html]
Prompt:[html]<script type="text/java script">
var name=prompt("What is your name?");
alert("What a lame name "+name);
</script>[/html]Simple multiplying calculator[html]<script type="text/java script">
var n1=prompt("Enter in any number");
var n2=prompt("Enter in another number");
alert(n1*n2);
</script>[/html]
Arrays:[html]<script type="text/java script">
var animals=new Array();
animals[0]="cat";
animals[1]="dog";
animals[2]="mouse";
alert(animals[2]);
</script>[/html]Second kind of Array[html]<script type="text/java script">
var animals=new Array("cat","dog","mouse");
alert(animals[2]);
</script>[/html]
If Else Statements:[html]<script type="text/java script">
var n1=2;
var n2=3;
If you liked my tutorial and you would like me to make another more advanced TuT on java scripts message me or comment, and don't forget to press the thanks button.
I know this is kinda late ;p. But this is a great tutorial, for someone starting out after, HTML. HTML just doesn't cut it for the stuff that java script has to offer. Thanks mate!