Books
in black and white
Main menu
Share a book About us Home
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 4th edition - Veer E.V

Veer E.V Javascript for dummies 4th edition - Wiley publishing , 2004. - 387 p.
ISBN: 0-7645-7659-3
Download (direct link): javascriptfordummies2005.pdf
Previous << 1 .. 95 96 97 98 99 100 < 101 > 102 103 104 105 106 107 .. 118 >> Next

Methods: handleEvent()
Event handlers: onDblClick, onMouseOut, onMouseOver (<AREA>), onClick, onDblClick, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseOut, onMouseUp, onMouseOver (<A> or String.link())
location
Description: The currently loaded URL.
What creates it: Automatically created by browser.
How to access it: window.location (or just location)
Properties: hash, host, hostname, href, pathname, port, protocol, search Methods: reload(), replace()
Event handlers: None
Math
Description: A built-in object containing properties and methods for mathematical constants and functions.
What creates it: Automatically created by browser.
Appendix C: Document Object Model Reference 315
How to access it: Math
Properties: E, LN10, LN2, LOG10E, LOG2E, PI, SQRT1_2, SQRT2
Methods: abs(), acos(), asin(), atan(), atan2(), ceil(), cos(), exp(), floor(), log(), max(), min(), pow(), random(), round(), sin(), sqrt(), tan()
Event handlers: None
MimeType
Description: A MIME type (Multipart Internet Mail Extension, such as .pdf) ^yfFERfy supported by the browser.
What creates it: Automatically created by Netscape Navigator.
How to access it:
navigator.mimeTypes[/] navigator.mimeTypes["type"] navigator.plugins[/].mimeTypes[j] navigator.mimeTypes.length
Properties: description, enabledPlugin, suffixes, type Methods: None Event handlers: None
navigator
Description: Browser configuration details.
What creates it: Automatically created by browser.
How to access it: window.navigator (or just navigator)
Properties: appCodeName, appName, appVersion, language, mimeTypes, platform, plugins, userAgent
316 Part VI: Appendixes
Methods: javaEnabled(), plugins.refresh(), preference(), save Preferences(), taintEnabled()
Event handlers: None
netscape
Description: A top-level object used to access any Java class in the package
netscape.*.
What creates it: Automatically created by Netscape Navigator.
(See JavaPackage.)
Number
Description: A JavaScript object wrapper for primitive numeric values.
What creates it: aNumber = new Number( value)
How to access it: aNumber
Properties: constructor, MAX_VALUE, MIN VALUE, NaN, NEGATIVE_ INFINITY, POSITIVE INFINITY, prototype Methods: toSource(), toString(), valueOf()
Event handlers: None
Object
Description: The primitive JavaScript object type from which all other objects derive.
What creates it:
anObject = new Object() or anotherObject = new Object(anObject ) How to access it: anObject, anotherObject
Appendix C: Document Object Model Reference 317
Properties: constructor, prototype Methods: eval(), toSource(), toString(), unwatch(), valueOf(), watch()
Event handlers: None
Option
Description: An option in an HTML select list.
What creates it: <FORM NAME="formName"><SELECT NAME="selectName"> <OPTION></SELECT></FORM> or new Option([text[, valuel, defaultSelectedl, selected]]]])
How to access it: document. formName. selectName .optionsl i ] Properties: defaultSelected, index, length, selected, text, value Methods: None Event handlers: None
Packages
Description: A top-level object that’s used to access Java classes from within JavaScript code.
What creates it: Automatically created by Java-supporting browsers.
How to access it: Depends on Java package.
Properties: className, java, netscape, sun Methods: Depends on Java package.
Event handlers: None
318 Part VI: Appendixes________________________________________________________________
Password
Description: A password field included in an HTML form. When a user enters text into a password field, asterisks (*) hide that text from view.
What creates it: <FORM NAME=" formName"> . . . <INPUT TYPE= "password" NAME="passwordName" . . . ></FORM>
How to access it: document. formName.passwordName or formName. elements[i]
Properties: defaultValue, form, name, type, value Methods: blur(), focus(), handleEvent(), select()
Event handlers: onBlur, onFocus
Plugin
Description: A plug-in application module installed in Netscape Navigator. What creates it: Netscape Navigator (on browser plug-in install).
How to access it: navigator.plugins[ i ]
Properties: description, filename, length, name Methods: None Event handlers: None
Radio
Description: A radio button in a set of radio buttons included in an HTML form. The user can use a set of radio buttons to choose one item from a list.
What creates it: <FORM NAME="formName"> . . . <INPUT TYPE="radio" NAME="radioName" . . . ></FORM>
How to access it: document. formName.radioName or formName. elements[i]
Appendix C: Document Object Model Reference 319
Properties: checked, defaultChecked, form, name, type, value Methods: blur(), click(), focus(), handleEvent()
Event handlers: onBlur, onClick, onFocus
RegExp
Description: Contains the pattern of a regular expression. This object provides properties and methods for using that regular expression to find and replace matches in strings.
What creates it: / pattern / flags
new RegExp("pattern"[, "flags"])
How to access it: Regular expressions are tricky animals. You use regular expressions for pattern-matching applications. The following gives an example:
Previous << 1 .. 95 96 97 98 99 100 < 101 > 102 103 104 105 106 107 .. 118 >> Next