Books
in black and white
Main menu
Home About us Share a book
Books
Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics
Ads

Javascript for dummies. Quick Reference - Vander

Vander Javascript for dummies. Quick Reference - Wiley Publishing, 2002. - 115 p.
Download (direct link): javascriptquickreference2002.pdf
Previous << 1 .. 40 41 42 43 44 45 < 46 > 47 48 49 50 51 52 .. 72 >> Next

You can change the value (or this property. An example of a valid value is http: //software. i bm. com.
// syntax for link object as well as area object document,links[index].href 1ocati on.href
.л**»»*,, Be aware that the href property is comprised of several other
properties (hash, host, hostname, port, and search). That means that if you change the values of any of these other properties, you’re also indirectly changing the value of h ref.
The hspace property of the image object enables you to access the value of the HS РАС E attribute of the HTML < IMG> tag. This value specifies a margin (measured in pixels) between the left and right edges of an image and the surrounding screen real estate. The hspace property only applies to images that have "left" or "right" defined for the value of the ALIGN attribute of the <IMG> tag.
document.myImage.hspace
The i mages array associated with the document object enables you to access all the images loaded into your page. Each element in the images array corresponds to an element defined with the HTML tag <IMG>.
document.images[0] document.i mages.1ength
The i ndex property of the opti on object enables you to access the position of an opti on in a sel ect object. Values for the index property are integers, beginning with zero, and are read-only.
document.myForm.mySelectField.opti ons[0].i ndex
Access the 1 astModi f i ed property of the document object to determine when a document was last modified. The value for this property is a string, and it’s read-only.
hspace
images
index
(astModified
document.1astModi fi ed
(ength
The length property is used on several different objects and arrays, and its value is always read-only.
Object Usage Value
a rray myArray.1ength Number of array elements
form document.my Form.1ength Number of elements for a form
frame my Frame.1ength Number of child frames within a frame
hi story hi story.1ength Number of entries in the hi story object
radi о document.my Form.myRadi о.1ength Number of radio buttons in a r a d i о object
select document.my Form.mySelect.1ength Number of options in a sel ect object
stri ng document.myForm.myStri ng.1ength Number of characters in a string
wi ndow 1ength Number of frames within a window

Array Usage Value
anchors document.anchors.length Number of anchors in a document
elements document.my Form.elements.1ength Number of elements defined for a form
embeds document.myForm.embeds.1ength Number of embedded plug-ins
forms document.forms.length Number of forms defined in a document
frames frames.1ength Number of frames in a frame/window
i mages document.images.length Number of images in a document
links document.1i nks.1ength Number of links in a document
opti ons document.my Form.mySelect. opti ons.1ength Number of options in a sel ect object
Surprise! Even though anchors is an array and its elements |Щ|1| are purportedly in source code order (that is, the Oth element
'IBr corresponds to the first anchor defined in a file, the first
130 tinkCotor
element to the second anchor defined, and so on), the value of document. anchors [ i ndex] is always null (null is geekspeak for “never existed”)- What a sense of humor those JavaScript architects had, huh?
tinkCotor
Use the 1 i nkCol or property of the document object to access the value of the LINK attribute. This value represents the color of initially displayed link text. Valid values for this property include hexadecimal RGB triplets (such as "OOFFFFFF") and predefined strings (such as " red''). You can change the values for this property. See also Appendix B.
document.1inkCol or
links
The links array of the document object enables you to access all the links that have been defined for a document. The array is in source code order (the first link defined is the Oth element in the array, and so forth). Elements of the array are read-only.
document.1i nks[0] document.1inks. 1 ength
LN2
The LN2 property of the Math object represents the natural logarithm of the number 2 (approximately 0.693). This property is read-only. (Unless you’re a heavy-duty math person, my guess is you’ll never feel the urge to use LN2 in your JavaScript calculations — but please feel free!)
Math.LN 2
LN10
The LN10 property of the Math object represents the natural logarithm of 10 (approximately 2.302). This property is read-only.
Math. LN10
method 1
(ocation
Use the 1 ocati on property of the document object to access a document’s complete URL. The value for this property is read-only.
document.1ocati on
L0G2E
The L0G2E property of the Math object represents the base 2 logarithm (approximately 1.442). This property is read-only.
Math.L0G2E
LOG WE
The L0G10E property of the Math object represents the base 10 logarithm (approximately 0.434). Because the base 10 logarithm is a mathematical constant, this property is read-oply.
Math.L0G10E
toWsrc
The 1 ows г с property of the i mage object reflects the value of the LOWS RC attribute defined as part of the HTML < I MG> tag. A valid value for this property is a URL for a low-resolution version of the image to load.
Previous << 1 .. 40 41 42 43 44 45 < 46 > 47 48 49 50 51 52 .. 72 >> Next