📄 props.html
字号:
<HTML>
<title>JavaScript properties</title>
<body background="ee.jpg">
<A NAME="properties"><H1>JavaScript 的对象属性</H1></A>
<P>以下的属性可在 JavaScript中用到:
<TABLE width=70%>
<TR>
<TD>
<LI><A HREF=#action_property>action</A>
<LI><A HREF=#alinkColor_property>alinkColor</A>
<LI><A HREF=#anchors_property>anchors</A>
<LI><A HREF=#bgColor_property>bgColor</A>
<LI><A HREF=#checked_property>checked</A>
<LI><A HREF=#current_property>current</A>
<LI><A HREF=#defaultChecked_property>defaultChecked</A>
<LI><A HREF=#defaultSelected_property>defaultSelected</A>
<LI><A HREF=#defaultStatus_property>defaultStatus</A>
<LI><A HREF=#defaultValue_property>defaultValue</A>
<LI><A HREF=#E_property>E</A>
<LI><A HREF=#elements_property>elements</A>
<LI><A HREF=#fgColor_property>fgColor</A>
</TD>
<TD>
<LI><A HREF=#forms_property>forms</A>
<LI><A HREF=#frames_property>frames</A>
<LI><A HREF=#hash_property>hash</A>
<LI><A HREF=#host_property>host</A>
<LI><A HREF=#hostname_property>hostname</A>
<LI><A HREF=#href_property>href</A>
<LI><A HREF=#index_property>index</A>
<LI><A HREF=#lastModified_property>lastModified</A>
<LI><A HREF=#length_property>length</A>
<LI><A HREF=#linkColor_property>linkColor</A>
<LI><A HREF=#links_property>links</A>
<LI><A HREF=#LN2_property>LN2</A>
<LI><A HREF=#LN10_property>LN10</A>
</TD>
<TD>
<LI><A HREF=#loadedDate_property>loadedDate</A>
<LI><A HREF=#location_property>location</A>
<LI><A HREF=#method_property>method</A>
<LI><A HREF=#name_property>name</A>
<LI><A HREF=#options_property>options</A>
<LI><A HREF=#parent_property>parent</A>
<LI><A HREF=#pathname_property>pathname</A>
<LI><A HREF=#PI_property>PI</A>
<LI><A HREF=#port_property>port</A>
<LI><A HREF=#protocol_property>protocol</A>
<LI><A HREF=#referrer_property>referrer</A>
<LI><A HREF=#search_property>search</A>
<LI><A HREF=#selected_property>selected</A>
</TD>
<TD>
<LI><A HREF=#selectedIndex_property>selectedIndex</A>
<LI><A HREF=#self_property>self</A>
<LI><A HREF=#SQRT1_2_property>SQRT1_2</A>
<LI><A HREF=#SQRT2_property>SQRT2</A>
<LI><A HREF=#status_property>status</A>
<LI><A HREF=#target_property>target</A>
<LI><A HREF=#text_property>text</A>
<LI><A HREF=#title_property>title</A>
<LI><A HREF=#top_property>top</A>
<LI><A HREF=#value_property>value</A>
<LI><A HREF=#vlinkColor_property>vlinkColor</A>
<LI><A HREF=#window_property>window</A>
</TD>
</TR>
</TABLE>
<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="action_property"><H2>action property</H2></A>
<P>
String value of a FORM tag's ACTION attribute.
<P>
<H3>Applies to</H3>
<P><A HREF="objects.html#form_object" >form</A>
<H3>Examples</H3>
<P>xxx Examples to be supplied.
<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="alinkColor_property"><H2>alinkColor property</H2></A>
<P>
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.
<P>
<H3>Applies to</H3>
<P><A HREF="objects.html#document_object" >document</A>
<H3>Examples</H3>
<P>xxx Examples to be supplied.
<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="anchors_property"><H2>anchors property</H2></A>
<P>
Array of objects corresponding to named anchors (<TT><A NAME=""></TT> tags) in source order.
<P>The <I>anchors</I> array contains an entry for each anchor in a document. For example, if a document contains three anchors, these anchors are reflected as <TT>document.anchors[0]</TT>, <TT>document.anchors[1]</TT>, and <TT>document.anchors[2]</TT>.
<P>To obtain the number of anchors in a document, use the length property: <TT>document.anchors.length</TT>.
<P>
<H3>Applies to</H3>
<P><A HREF="objects.html#document_object" >document</A>
<H3>Examples</H3>
<P>xxx Examples to be supplied.
<H3>See also</H3>
<LI><A HREF=#length_property>length</A> property
<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="bgColor_property"><H2>bgColor property</H2></A>
<P>
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.
<P>
<H3>Applies to</H3>
<P><A HREF="objects.html#document_object" >document</A>
<H3>Examples</H3>
<P>xxx Examples to be supplied.
<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="checked_property"><H2>checked property</H2></A>
<P>
For checkbox, Boolean, false if not checked, true if checked. For radioButton, Boolean, false if not pressed, true if pressed.
<P>
<H3>Applies to</H3>
<P><A HREF="objects.html#checkbox_object" >checkbox</A>, <A HREF="objects.html#radioButton_object" tppabs="http://www.webjx.com/objects.html#radioButton_object">radioButton</A>
<H3>Examples</H3>
<P>
xxx To be supplied.
<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="current_property"><H2>current property</H2></A>
<P>
URL of current page. xxx Not yet implemented in Beta 4.
<P>
<H3>Applies to</H3>
<P><A HREF="objects.html#history_object" tppabs="http://www.webjx.com/objects.html#history_object">history</A>
<H3>Examples</H3>
<P>xxx Examples to be supplied.
<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="defaultChecked_property"><H2>defaultChecked property</H2></A>
<P>
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.
<P>
<H3>Applies to</H3>
<P><A HREF="objects.html#checkbox_object" >checkbox</A>, <A HREF="objects.html#radioButton_object" tppabs="http://www.webjx.com/objects.html#radioButton_object">radioButton</A>
<H3>Examples</H3>
<P>xxx Examples to be supplied.
<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="defaultSelected_property"><H2>defaultSelected property</H2></A>
<P>
Boolean property that indicates if the option is selected by default, by the presence of the SELECTED attribute in the HTML OPTION tag.
<P>
<H3>Applies to</H3>
<P><A HREF="objects.html#selection_object" tppabs="http://www.webjx.com/objects.html#selection_object">selection</A>
<H3>Examples</H3>
<P>xxx Examples to be supplied.
<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="defaultStatus_property"><H2>defaultStatus property</H2></A>
<P>
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.
<P>
<H3>Applies to</H3>
<P><A HREF="objects.html#window_object" tppabs="http://www.webjx.com/objects.html#window_object">window</A>
<H3>Examples</H3>
<P>xxx Examples to be supplied.
<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="defaultValue_property"><H2>defaultValue property</H2></A>
<P>
For text and textArea, string, the initial contents of the field.
<P>
<H3>Applies to</H3>
<P><A HREF="objects.html#password_object" tppabs="http://www.webjx.com/objects.html#password_object">password</A>, <A HREF="objects.html#text_object" tppabs="http://www.webjx.com/objects.html#text_object">text</A>, <A HREF="objects.html#textArea_object" tppabs="http://www.webjx.com/objects.html#textArea_object">textArea</A>
<H3>Examples</H3>
<P>xxx Examples to be supplied.
<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="E_property"><H2>E property</H2></A>
<P>
E is Euler's constant, the base of natural logarithms, roughly 2.718.
<P>
<H3>Applies to</H3>
<P><A HREF="objects.html#Math_object" tppabs="http://www.webjx.com/objects.html#Math_object">Math</A>
<H3>Examples</H3>
<P>xxx Examples to be supplied.
<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="elements_property"><H2>elements property (client)</H2></A>
Array of objects corresponding to form elements (such as checkbox, radioButton, and text objects) in source order.
<P>The <I>elements</I> 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 <TT><I>formName</I>.elements[0]</TT>, <TT><I>formName</I>.elements[1]</TT>, and <TT><I>formName</I>.elements[2]</TT>.
<! xxx if length property applies here, copy blurb about it. ->
<P>
<H3>Applies to</H3>
<P><A HREF="objects.html#form_object" >form</A>
<H3>Examples</H3>
<P>xxx Examples to be supplied.
<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="fgColor_property"><H2>fgColor property</H2></A>
<P>
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.
<P>
<H3>Applies to</H3>
<P><A HREF="objects.html#document_object" >document</A>
<H3>Examples</H3>
<P>xxx Examples to be supplied.
<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="forms_property"><H2>forms property</H2></A>
<P>
Array of objects corresponding to named forms (<TT><FORM NAME=""></TT> tags) in source order.
<P>The <I>forms</I> array contains an entry for each form object in a document. For example, if a document contains three forms, these forms are reflected as <TT>document.forms[0]</TT>, <TT>document.forms[1]</TT>, and <TT>document.forms[2]</TT>.
<P>You can refer to a form's elements by using the <I>forms</I> array. For example, you would refer to a text object named <I>quantity</I> in the second form as:
<PRE>
document.forms[1].quantity
</PRE>
You would refer to the value property of this text object as:
<PRE>
document.forms[1].quantity.value
</PRE>
<P>To obtain the number of forms in a document, use the length property: <TT>document.forms.length</TT>.
<P>
<H3>Applies to</H3>
<P><A HREF="objects.html#document_object" >document</A>
<H3>Examples</H3>
<P>xxx Examples to be supplied.
<H3>See also</H3>
<LI><A HREF=#length_property>length</A> property
<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="frames_property"><H2>frames property</H2></A>
<P>
Array of objects corresponding to child frame windows (<FRAMESET> tag) in source order.
<P>The <I>frames</I> 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 <TT>window.frames[0]</TT>, <TT>window.frames[1]</TT>, and <TT>window.frames[2]</TT>.
<P>To obtain the number of number of child frames in a window, use the length property: <TT>window.frames.length</TT>.
<P>
<H3>Applies to</H3>
<P><A HREF="objects.html#window_object" tppabs="http://www.webjx.com/objects.html#window_object">window</A>
<H3>Examples</H3>
<P>xxx Examples to be supplied.
<H3>See also</H3>
<LI><A HREF=#length_property>length</A> property
<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="hash_property"><H2>hash property</H2></A>
<P>
The anchor name following the # symbol.
<P>
<H3>Applies to</H3>
<P><A HREF="objects.html#location_object" tppabs="http://www.webjx.com/objects.html#location_object">location</A>
<H3>Examples</H3>
<P>xxx Examples to be supplied.
<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="host_property"><H2>host property</H2></A>
<P>
The hostname:port part of the location or URL.
<P>
<H3>Applies to</H3>
<P><A HREF="objects.html#location_object" tppabs="http://www.webjx.com/objects.html#location_object">location</A>
<H3>Examples</H3>
<P>xxx Examples to be supplied.
<H3>See also</H3>
<LI><A HREF=#hostname_property>hostname</A>
<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="hostname_property"><H2>hostname property</H2></A>
<P>
The hostname part of the location or URL.
<P>
<H3>Applies to</H3>
<P><A HREF="objects.html#location_object" tppabs="http://www.webjx.com/objects.html#location_object">location</A>
<H3>Examples</H3>
<P>xxx Examples to be supplied.
<H3>See also</H3>
<LI><A HREF=#host_property>host</A>
<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="href_property"><H2>href property</H2></A>
<P>
The entire URL as a JavaScript string.
<P>
<H3>Applies to</H3>
<P><A HREF="objects.html#location_object" tppabs="http://www.webjx.com/objects.html#location_object">location</A>
<H3>Examples</H3>
<P>xxx Examples to be supplied.
<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="index_property"><H2>index property</H2></A>
<P>
For radioButton, number, the ordinal number of the radioButton field, 0-based. For a select object option, the number identifying the position of the option in the selection, starting from zero.
<P>
<H3>Applies to</H3>
<P><A HREF="objects.html#radioButton_object" tppabs="http://www.webjx.com/objects.html#radioButton_object">radioButton</A>, <A HREF="objects.html#selection_object" tppabs="http://www.webjx.com/objects.html#selection_object">selection</A>
<H3>Examples</H3>
<P>xxx Examples to be supplied.
<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="lastModified_property"><H2>lastModified property</H2></A>
<P>
A string containing the last-modified date.
<P>
<H3>Applies to</H3>
<P><A HREF="objects.html#document_object" >document</A>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -