What is Java Script?Java Script is a Object orientated Programming language, as well as Java. The main diferrence is that Java programming can create fully stand-alone events. JavaScript cannot stand alone. It must be running inside of a Web page, and the Web page must be displayed in a browser that understands the JavaScript language.Writing JavaScriptJavaScript is not HTML! JavaScript goes inside the HTML document and is saved as text right along with the HTML document. The major difference between the two is that HTML is very forgiving in terms of its shape. White space means nothing to HTMl. The opposite is true in JavaScript. It does have a shape.Editing JavaScriptWhether we're editing or writing script, we can not allow margings to get in the way. JavaScript is Case Sensitive. The first line of text looks like this:
This is the HTML code to alert the browser that what immediately follows is going to be a JavaScript script. All JavaScripts start
with this exact command. All JavaScript scripts end with the following command:
ExamplesThe bellow script posts the exact day and time you arrived at this page:
<SCRIPT LANGUAGE="Javascript"> The document.write line above should be all on one line. You could see the effect here The next script shows you how to open a new window:
<SCRIPT LANGUAGE="javascript"> See how it works by opening new window Would you like to see more of this? World Wide Web is the best source of JavaScript. There are scripts everywhere. Go to the top of the page. |
|||||||||||||||
| [main] | [contents] | [conventions] | [guide lines] | ||||
| [html tags] | [design] | [navigation] | [style sheets] | [java script] | [guest book] |