Jump to content

JavaScript/Basics: Difference between revisions

From IdeaWazaWiki
Grammar revision
wikademia>Hampshire2004
m Spelling revisions
Line 19: Line 19:
  </html>
  </html>


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 don't 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 browser that what ever you write between the that tag and the coming </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.
It is also important to note that JavaScript is case sensitive. What this means is what ever you type must be in capitalized 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 I'm going to explain the rest of what you did. Well, document.write is the JavaScript standard way of writing. You declared where you wanted to be messing 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")
<br>
<br>
These are the absolute essentials to understand for starting JavaScript.
These are the absolute essentials to understand for starting JavaScript.

Revision as of 12:58, 16 May 2007

What you should know - HTML/XHTML

Basics -

  • JavaScript is the most popular web page scripting language and is suppported by almost every browser.
  • It adds interactivity to your web pages.
  • You can use only the tools all ready on your computer with out the need to download any software.
  • It is easy and fun

First Lesson

Open up your text editor of choice and create a basic page. Now I am going to teach you how to write on your webpage using JavaScript.

<html>
	<body>
		<script type="text/javascript">
			document.write("Hello World!")
		</script>
	</body>
</html>

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. What you do need to know is this <script type"text/javascript"> tells the browser that what ever you write between the that tag and the coming </script> tag is JavaScript.

It is also important to note that JavaScript is case sensitive. What this means is what ever you type must be in capitalized 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.
You are probably wondering when I'm going to explain the rest of what you did. Well, document.write is the JavaScript standard way of writing. You declared where you wanted to be messing 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")
These are the absolute essentials to understand for starting JavaScript.
--Xora K Joken 19:18, 3 April 2007 (UTC)