javascript手冊-u-z[1]

[入库:2005年8月18日] [更新:2007年3月25日]

本文简介:选择自 longj 的 blog

 

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:

  • "%integer", where integer is a number between 0 and 255 (decimal)
  • "hex", where hex is a number between 0x0 and 0xff (hexadecimal)

    描述

    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")
    

    相关

  • escape function

    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

    navigator

    描述

    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)

    相关

  • appname, appversion, appcodename properties

    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.

    用法

    date

    描述

    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))
    

    相关

  • parse method

    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.

  • 本文关键:javascript
     

    本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

    go top