SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 1873 | Next

Joseph W. Lowery

"Dreamweaver CS3 Bible"

defaultSelected* focus() (Windows only) OnChange
options[n].index* onFocus() (Windows only)
options[n].selected*
options[n].text*
options[n].value
selectedIndex
JavaScript uses a hierarchical method of addressing the various elements on any given Web
page. Moving from most general to most specific, each element is separated by a period. For
example, the background color property of a page is document.bgColor. The status of a checkbox named
sendPromo on a form called orderForm is document.orderForm.sendPromo.checked. The more
complex your objects, the more important it is for you to master this syntax.
NOTE NOTE
BC 16
Creating and Using Objects
Input fields: Text, Textarea, Password, File, Image, and Hidden
When information is entered in one of the input type fields, the data is stored in the value property of the
specific object. For example, look again at the code for the Plugin object and notice the text field where the
selected file??™s name is displayed:

When the objectTag() function is run, the contents of that text box are assigned to a variable, and that
variable is included in the output written to the Web page:
function objectTag() {
// Return the html tag that should be inserted
var retval = ???escape(document.


Pages:
1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885