| 网站首页 | 文章中心 | 电子书下载 | 矢量图库 | 视频教程 | 素材下载 | 程序代码下载 | JS代码 | 论坛 | 
常用软件类:
|杀毒安全 |联络聊天 |网络软件 |多媒体类 |系统工具 |图形图像 |系统工具 |应用软件 |行业软件
开发设计类:
|动画制作 |图像处理 |3D设计 |操作系统 |站长学院 |网络相关 |WEB设计 |数据库类 |程序开发
JavaScript 的对象属性
作者:佚名    文章来源:网络    点击数:    更新时间:2006-9-20
 

以下的属性可在 JavaScript中用到:

  • action
  • alinkColor
  • anchors
  • bgColor
  • checked
  • current
  • defaultChecked
  • defaultSelected
  • defaultStatus
  • defaultValue
  • E
  • elements
  • fgColor
  • forms
  • frames
  • hash
  • host
  • hostname
  • href
  • index
  • lastModified
  • length
  • linkColor
  • links
  • LN2
  • LN10
  • loadedDate
  • location
  • method
  • name
  • options
  • parent
  • pathname
  • PI
  • port
  • protocol
  • referrer
  • search
  • selected
  • selectedIndex
  • self
  • SQRT1_2
  • SQRT2
  • status
  • target
  • text
  • title
  • top
  • value
  • vlinkColor
  • window

  • action property

    String value of a FORM tag's ACTION attribute.

    Applies to

    form

    Examples

    xxx Examples to be supplied.


    alinkColor property

    RGB value for color of activated links (after mouse-button down, but before mouse-button up), expressed as a hexadecimal triplet. This property is the JavaScript reflection of the ALINK attribute of the HTML BODY tag.

    Applies to

    document

    Examples

    xxx Examples to be supplied.


    anchors property

    Array of objects corresponding to named anchors (<A NAME=""> tags) in source order.

    The anchors array contains an entry for each anchor in a document. For example, if a document contains three anchors, these anchors are reflected as document.anchors[0], document.anchors[1], and document.anchors[2].

    To obtain the number of anchors in a document, use the length property: document.anchors.length.

    Applies to

    document

    Examples

    xxx Examples to be supplied.

    See also

  • length property

    bgColor property

    RGB value of background color, expressed as a hexadecimal triplet. This property is the JavaScript reflection of the BGCOLOR attribute of the HTML BODY tag.

    Applies to

    document

    Examples

    xxx Examples to be supplied.


    checked property

    For checkbox, Boolean, false if not checked, true if checked. For radioButton, Boolean, false if not pressed, true if pressed.

    Applies to

    checkbox, radioButton

    Examples

    xxx To be supplied.


    current property

    URL of current page. xxx Not yet implemented in Beta 4.

    Applies to

    history

    Examples

    xxx Examples to be supplied.


    defaultChecked property

    For checkbox, Boolean property that indicates if the element is selected by default, by the CHECKED attribute. For radioButton, Boolean property that indicates if the element is selected by default, by the CHECKED attribute.

    Applies to

    checkbox, radioButton

    Examples

    xxx Examples to be supplied.


    defaultSelected property

    Boolean property that indicates if the option is selected by default, by the presence of the SELECTED attribute in the HTML OPTION tag.

    Applies to

    selection

    Examples

    xxx Examples to be supplied.


    defaultStatus property

    For a window, the defaultStatus property reflects the default message displayed in the status bar at the bottom of the window. Do not confuse defaultStatus with status. The status property reflects a priority or transient message in the status bar, such as the message that appears when a mouseOver event occurs over an anchor.

    Applies to

    window

    Examples

    xxx Examples to be supplied.


    defaultValue property

    For text and textArea, string, the initial contents of the field.

    Applies to

    password, text, textArea

    Examples

    xxx Examples to be supplied.


    E property

    E is Euler's constant, the base of natural logarithms, roughly 2.718.

    Applies to

    Math

    Examples

    xxx Examples to be supplied.


    elements property (client)

    Array of objects corresponding to form elements (such as checkbox, radioButton, and text objects) in source order.

    The elements array contains an entry for each object in a form. For example, if a form has a text field, a radio button group, and a checkbox, these elements are reflected as formName.elements[0], formName.elements[1], and formName.elements[2].

    Applies to

    form

    Examples

    xxx Examples to be supplied.


    fgColor property

    RGB value of foreground (text) color, expressed as a hexadecimal triplet. This property is the JavaScript reflection of the FGCOLOR attribute of the HTML BODY tag.

    Applies to

    document

    Examples

    xxx Examples to be supplied.


    forms property

    Array of objects corresponding to named forms (<FORM NAME=""> tags) in source order.

    The forms array contains an entry for each form object in a document. For example, if a document contains three forms, these forms are reflected as document.forms[0], document.forms[1], and document.forms[2].

    You can refer to a form's elements by using the forms array. For example, you would refer to a text object named quantity in the second form as:

    document.forms[1].quantity
    
    You would refer to the value property of this text object as:
    document.forms[1].quantity.value
    

    To obtain the number of forms in a document, use the length property: document.forms.length.

    Applies to

    document

    Examples

    xxx Examples to be supplied.

    See also

  • length property

    frames property

    Array of objects corresponding to child frame windows (<FRAMESET> tag) in source order.

    The frames array contains an entry for each child frame in a window. For example, if a window contains three child frames, these frames are reflected as window.frames[0], window.frames[1], and window.frames[2].

    To obtain the number of number of child frames in a window, use the length property: window.frames.length.

    Applies to

    window

    Examples

    xxx Examples to be supplied.

    See also

  • length property
  • [1] [2] [3] 下一页


  • 上一篇文章:

  • 下一篇文章:
  • 相关文章