javascript手冊-h[1]

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

本文简介:选择自 longj 的 blog

 

hash property

a string beginning with a hash mark (#) that specifies an anchor name in the url.

语法

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

index is an integer representing a link object.

property of

link, location

描述

the hash property specifies a portion of the url.

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

see rfc 1738 for complete information about the hash.

例子

see the 例子 for the anchor object and the href property.

相关

  • host, hostname, href, pathname, port, protocol, search properties

    hidden object

    a text object that is suppressed from form display on an htm form. a hidden object is used for passing name/value pairs when a form submits.

    语法

    to define a hidden object:

    <input
       type="hidden"
       name="hiddenname"
       [value="textvalue"]>
    
    name="hiddenname" specifies the name of the hidden object. you can access this value using the name property.
    value="textvalue" specifies the initial value of the hidden object.

    to use a hidden object's properties:

    1. hiddenname.propertyname
    2. formname.elements[index].propertyname
    
    hiddenname is the value of the name attribute of a hidden object.
    formname is either the value of the name attribute of a form object or an element in the forms array.
    index is an integer representing a hidden object on a form.

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

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

    go top