javascript手冊-l[9]

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

本文简介:选择自 longj 的 blog

about:plug-ins displays information about plug-ins you have configured. this is the same as choosing about plug-ins from the navigator's help menu.

properties

  • hash specifies an anchor name in the url
  • host specifies the hostname:port portion of the url
  • hostname specifies the host and domain name, or ip address, of a network host
  • href specifies the entire url
  • pathname specifies the url-path portion of the url
  • port specifies the communications port that the server uses for communications
  • protocol specifies the beginning of the url, including the colon
  • search specifies a query

    methods

  • none.

    event handlers

  • none.

    例子

    example 1. the following two statements are equivalent and set the url of the current window to the netscape home page:

    window.location.href="http://www.netscape.com/" window.location="http://www.netscape.com/"

    example 2. the following statement sets the url of a frame named frame2 to the sun home page:

    parent.frame2.location.href="http://www.sun.com/"

    相关 the example for the anchor object.

    相关

  • history object
  • location property

    location property

    a string specifying the complete url of the document.

    语法

    document.location

    property of

    document

    描述

    do not confuse the location property of the document object with the location object. you cannot change the value of the location property (document.location), but you can change the value of the location object's properties (window.location.propertyname). document.location is a string-valued property that usually matches what window.location.href is set to when you load the document, but redirection may change it.

    location is a read-only property of document.

    例子

    the following example displays the url of the current document:

    document.write("the current url is " + document.location)
    

    相关

  • location object

    log method

    returns the natural logarithm (base e) of a number.

    语法

    math.log(number)
    number is any positive numeric expression or a property of an existing object.

    method of

  • 本文关键:javascript
      相关方案
    Google
     

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

    go top