Now To Show You Some Windows ObjectsThe following are going to show you different window object properties you can use in JavaScript directly in your document. First lets try a status property. This is the value that is set in the status bar on the bottom of your browser. Currently it is empty. By moving your mouse over the button below, you will see a new value in the status bar! Next in the open() method, JavaScript allows you to open a new window. This method takes 3 parameters, the third which sets a number of options that the window may need. The first parameter URL sets the HTML document that will be opened. the name or second parameter is the name you wish to give to the window. The third enables you to add attributes for the new window.
Showing You Now A Simple ArrayAn array is a way of storing data of similar types for easy access later in a script. In JavaScript an array is basically a user-defined object that is typically accessed in a different way than other opbjects. In a regular array, access to an element is usually through the use of an index number. An associative array allows access using a string in place of a number.
Top Ten in Points: Now say I just wanted to show the Cup Drivers that also drive fulltime in the Busch Series. Using a simple document.write, I can tell it to only show the drivers I want it to show by specifying the number that they are on the list. Keep in mind, the list starts at 0 (zero), not 1 (one) for numbering of items. Let's String It Together, Literally!Now we are going to play with some String Literal methods. These methods can range from changing the size of the text to the color of the text. There are actually 29 methods available for use. We will show .
Now let do a few in a row. We will change the color of the text, use the concat method (which combines strings), change the size of the text, set some italics, and change the case. See if you can tell what is where! Ok, so the breakdown goes like this. Line 1 is italics, line 2 is font color change, line 3 is font size change, line 4 is changing the text to Uppercase, line 5 is the concat method (combines 3 concat to the original variable) and the last line, if you are viewing this in Netscape, is BLINKING! Now To Gather Some Information About YouEnter your information in the boxes below and then click the button to see a a new page!
Go on to the next page to see more examples of JavaScript at work! |