javascript手冊-h[3]

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

本文简介:选择自 longj 的 blog

methodname is one of the methods listed below.

property of

  • document

    描述

    the history object is a linked list of urls the user has visited, as shown in the navigator's go menu.

    properties

  • length reflects the number of entries in the history object

    methods

  • back
  • forward
  • go

    event handlers

  • none.

    例子

    example 1. the following example goes to the url the user visited three clicks ago in the current window.

    history.go(-3)

    example 2. you can use the history object with a specific window or frame. the following example causes window2 to go back one item in its window (or session) history:

    window2.history.back()

    example 3. the following example causes the second frame in a frameset to go back one item:

    parent.frames[1].history.back()

    example 4. the following example causes the frame named frame1 in a frameset to go back one item:

    parent.frame1.history.back()

    example 5. the following example causes the frame named frame2 in window2 to go back one item:

    window2.frame2.history.back()

    相关

  • location object

    host property

    a string specifying the hostname:port portion of the url.

    语法

    1. links[index].host
    2. location.host
    

    index is an integer representing a link object.

    property of

    link, location

    描述

    the host property specifies a portion of the url. the host property is the concatenation of the hostname and port properties, separated by a colon. when the port property is null, the host property is the same as the hostname property.

    you can set the host property at any time, although it is safer to set the href property to change a location. if the host that you specify cannot be found in the current location, you will get an error.

    see section 3.1 of rfc 1738 for complete information about the hostname and port.

    例子

    see the 例子 for the href property.

    相关

  • hash, hostname, href, pathname, port,
  • 本文关键:javascript
      相关方案
    Google
     

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

    go top