JavaScript/Basics: Difference between revisions
wikademia>Hampshire2004 m RV Vandalism |
wikademia>Hampshire2004 m RV Vandalism |
||
| Line 16: | Line 16: | ||
<body> | <body> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
document.write(" | document.write("Hello World!") | ||
</script> | </script> | ||
</body> | </body> | ||
</html> | </html> | ||
As you can see, JavaScript is | As you can see, JavaScript is added directly into your HTML by adding the <script> tag. You don't have to understand exactly how that worked, I'm about to explain. | ||
To start off with, the <script type"text/javascript"> tag tells the browser that whatever comes between that tag and the coming </script> tag is JavaScript. Similarly, to use [[wikipedia:VBScript | VBScript]], you might add a <script type="text/vbscript"> tag. For the purposes of this course, though, you should only ever need to use the JavaScript tag.<br> | To start off with, the <script type"text/javascript"> tag tells the browser that whatever comes between that tag and the coming </script> tag is JavaScript. Similarly, to use [[wikipedia:VBScript | VBScript]], you might add a <script type="text/vbscript"> tag. For the purposes of this course, though, you should only ever need to use the JavaScript tag.<br> | ||
| Line 34: | Line 34: | ||
<br> | <br> | ||
--[[User:Xora K Joken|Xora K Joken]] 19:18, 3 April 2007 (UTC) | --[[User:Xora K Joken|Xora K Joken]] 19:18, 3 April 2007 (UTC) | ||
==Second Lesson== | ==Second Lesson== | ||