unescape function
returns the ascii string for the specified value.
语法
unescape("string")
string is a string or a property of an existing object, containing characters in either of the following forms:
描述
the unescape function is not a method associated with any object, but is part of the language itself.
the string returned by the unescape function is a series of characters in the iso latin-1 character set.
例子
the following example returns "&"
unescape("%26")
the following example returns "!#"
unescape("%21%23")
相关
useragent property
a string representing the value of the user-agent header sent in the http protocol from client to server.
语法
navigator.useragent
property of
描述
servers use the value sent in the user-agent header to identify the client.
useragent is a read-only property.
例子
the following example displays useragent information for the navigator:
document.write("the value of navigator.useragent is " +
navigator.useragent)
for navigator 2.0, this displays the following:
the value of navigator.useragent is mozilla/2.0 (win16; i)
相关
utc method
returns the number of milliseconds in a date object since january 1, 1970 00:00:00, universal coordinated time (gmt).
语法
date.utc(year, month, day [, hrs] [, min] [, sec])
year is a year after 1900.
month is a month between 0-11.
date is a day of the month between 1-31.
hrs is hours between 0-23.
min is minutes between 0-59.
sec is seconds between 0-59.
用法
描述
utc takes comma-delimited date parameters and returns the number of milliseconds since january 1, 1970 00:00:00, universal coordinated time (gmt).
because utc is a static 用法 date, you always use it as date.utc(), rather than as a 用法 a date object you created.
例子
the following statement creates a date object using gmt instead of local time:
gmtdate = new date(date.utc(96, 11, 1, 0, 0, 0))
相关
value property
a string that is related to the value attribute of its object.
语法
1. objectname.value 2. radioname[index].value 3. selectname.options.[index].value
objectname is either the value of the name attribute of a hidden, password, text, textarea, button, reset, submit or checkbox object or an element in the elements array.
radioname is the value of the name attribute of a radio object.
selectname is either the value of the name attribute of a select object or an element in the elements array.