javascript手冊-u-z[4]

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

本文简介:选择自 longj 的 blog

  • defaultselected, selected, selectedindex, text properties

    for checkbox and radio:

  • checked, defaultchecked properties

    vlinkcolor property

    a string specifying the color of visited links.

    语法

    document.vlinkcolor

    property of

    document

    描述

    the vlinkcolor property is expressed as a hexadecimal rgb triplet or as one of the string literals listed in color values. this property is the javascript reflection of the vlink attribute of the <body> tag. the default value of this property is set by the user on the colors tab of the preferences dialog box, which is displayed by choosing general preferences from the options menu. you cannot set this property after the htm source has been through layout.

    if you express the color as a hexadecimal rgb triplet, you must use the format rrggbb. for example, the hexadecimal rgb values for salmon are red=fa, green=80, and blue=72, so the rgb triplet for salmon is "fa8072".

    例子

    the following example sets the color of visited links to aqua using a string literal:

    document.vlinkcolor="aqua"
    

    the following example sets the color of active links to aqua using a hexadecimal triplet:

    document.vlinkcolor="00ffff"
    

    相关

  • alinkcolor, bgcolor, fgcolor, and linkcolor properties

    window object

    the top-level object for each document, location, and history object group.

    语法

    to define a window, use the open method:

    windowvar = window.open("url", "windowname" [,"windowfeatures"])
    
    windowvar is the name of a new window. use this variable when referring to a window's properties, methods, and containership.

  • 本文关键:javascript
     

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

    go top