JavaScript/Basics: Difference between revisions
wikademia>BigChicken No edit summary |
Grammar revision |
||
| Line 21: | Line 21: | ||
As you can see JavaScript is added directly into your HTML by adding the <script> tag. You dont have to understand exactly how that worked, I'm about to explain. What you do need to know is this <script type"text/javascript"> tells the borwser that what ever you write between the that tag and the comsing </script> tag is JavaScript.<br> | As you can see JavaScript is added directly into your HTML by adding the <script> tag. You dont have to understand exactly how that worked, I'm about to explain. What you do need to know is this <script type"text/javascript"> tells the borwser that what ever you write between the that tag and the comsing </script> tag is JavaScript.<br> | ||
<br> | <br> | ||
It is also important to note that JavaScript is case sensitive. What this means is what ever you type must be in capitilized the way it should be. For example if you wrote <ScRiPt TyPe="TeXt/JaVaScRiPt"> not only would you waste alot of time, your browser would also have no idea what you did. | |||
<br> | <br> | ||
You are probably wondering when im going to explain the rest of what you did. Well, document.write is the JavaScript standered way of writing. You declaired where you wanted to be mesing with by typing document, then you told what you wanted to do on the document, also known as giving the command, with .write, then you told the the bowser what to do with the command, and in this case what to write with ("Hello World") | You are probably wondering when im going to explain the rest of what you did. Well, document.write is the JavaScript standered way of writing. You declaired where you wanted to be mesing with by typing document, then you told what you wanted to do on the document, also known as giving the command, with .write, then you told the the bowser what to do with the command, and in this case what to write with ("Hello World") | ||