HTML and CSS Reference
In-Depth Information
Table G-17 Math Object (continued)
Property
Description
max(x,y)
Larger of two numbers
min(x,y)
Smaller of two numbers
pow(x,y)
Value of x raised to the y power
random()
Random number between 0.0 and 1.0
round(x)
Value of x rounded to the nearest integer
sin(x)
Sine of x
sqrt(x)
Square root of x
tan(x)
Tangent of x
Location Object
The Location object contains information about a Web page. Table G-18
summarizes the Location object properties and methods.
Table G-18 Location Object
Property
Description
hash
URL's anchor
host
Combination of URL's host name and port sections
hostname
URL's host name
href
Full URL address
pathname
URL's path
port
URL's port
protocol
URL's protocol
search
URL's search or query portion
Method
Function
reload()
Causes the page currently displayed in the Web browser to open again
replace()
Replaces the currently loaded URL with a different one
Navigator Object
The Navigator object is used to get information about the current Web browser.
Table G-19 summarizes the Navigator object properties and methods.
Table G-19 Navigator Object
Property
Description
appName
Web browser name
appVersion
Web browser version
cookieEnabled
Boolean result to indicate if cookies are enabled
language
Language used by the Web browser
mimeTypes[]
Array containing MIME types supported by the client browser
online
Returns a Boolean indicating whether the browser is working online
oscpu
Returns a string that represents the current operating system
platform
Operating system in use
plugins[]
Array containing installed plugins
 
Search WWH ::




Custom Search