⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 objects.html

📁 学习源代码
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<BR><SELECT NAME="music_type_multi" MULTIPLE>
   <OPTION SELECTED> R&B <OPTION> Jazz <OPTION> Blues <OPTION> New Age</SELECT>
</XMP>


<H3>See also</H3>
<LI><A HREF=#radioButton_object>radioButton</A> object
<LI><A HREF="props.html#options_property" tppabs="http://www.webjx.com#options_property">options</A> property

<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="string_object"><H2>string object (common)</H2></A>
<P>A string object consists of a series of characters.


<H3>Syntax</H3>
<PRE><I>stringName</I>.<I>property</I>|<I>method</I></PRE>
<I>stringName</I> is the name of a string variable.
<BR><I>property</I> is one of the properties listed below.
<BR><I>method</I> is one of the methods listed below.


<H3>Description</H3>
<P>A string can be represented as a literal enclosed by single or double quotes; for example, "Netscape" or 'Netscape'.


<H3>Properties</H3>
<LI><A HREF="props.html#length_property" tppabs="http://www.webjx.com#length_property">length</A>


<H3>Methods</H3>
<LI><A HREF="methods.html#anchor_method" tppabs="http://www.webjx.com#anchor_method">anchor</A>
<LI><A HREF="methods.html#big_method" tppabs="http://www.webjx.com#big_method">big</A>
<LI><A HREF="methods.html#blink_method" tppabs="http://www.webjx.com#blink_method">blink</A>
<LI><A HREF="methods.html#bold_method" tppabs="http://www.webjx.com#bold_method">bold</A>
<LI><A HREF="methods.html#charAt_method" tppabs="http://www.webjx.com#charAt_method">charAt</A>
<LI><A HREF="methods.html#fixed_method" tppabs="http://www.webjx.com#fixed_method">fixed</A>
<LI><A HREF="methods.html#fontcolor_method" tppabs="http://www.webjx.com#fontcolor_method">fontcolor</A>
<LI><A HREF="methods.html#fontsize_method" tppabs="http://www.webjx.com#fontsize_method">fontsize</A>
<LI><A HREF="methods.html#indexOf_method" tppabs="http://www.webjx.com#indexOf_method">indexOf</A>
<LI><A HREF="methods.html#italics_method" tppabs="http://www.webjx.com#italics_method">italics</A>
<LI><A HREF="methods.html#lastIndexOf_method" tppabs="http://www.webjx.com#lastIndexOf_method">lastIndexOf</A>
<LI><A HREF="methods.html#link_method" tppabs="http://www.webjx.com#link_method">link</A>
<LI><A HREF="methods.html#small_method" tppabs="http://www.webjx.com#small_method">small</A>
<LI><A HREF="methods.html#strike_method" tppabs="http://www.webjx.com#strike_method">strike</A>
<LI><A HREF="methods.html#sub_method" tppabs="http://www.webjx.com#sub_method">sub</A>
<LI><A HREF="methods.html#substring_method" tppabs="http://www.webjx.com#substring_method">substring</A>
<LI><A HREF="methods.html#sup_method" tppabs="http://www.webjx.com#sup_method">sup</A>
<LI><A HREF="methods.html#toLowerCase_method" tppabs="http://www.webjx.com#toLowerCase_method">toLowerCase</A>
<LI><A HREF="methods.html#toUpperCase_method" tppabs="http://www.webjx.com#toUpperCase_method">toUpperCase</A>


<H3>Event handlers</H3>
<P>
None. Built-in objects do not have event handlers.


<H3>Examples</H3>
<P>The following statement creates a string variable.
<XMP>
var last_name = "Schaefer"
</XMP>

<P><TT>last_name.length</TT> is 8.
<BR><TT>last_name.toUpperCase()</TT> is "SCHAEFER".
<BR><TT>last_name.toLowerCase()</TT> is "schaefer".


<H3>See also</H3>
<LI><A HREF=#text_object>text</A> and <A HREF=#textarea_object>textArea</A> objects


<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="submit_object"><H2>submit object (client)</H2></A>
<P>A submit object is a submit button on an HTML form.


<H3>Syntax</H3>
<P>To define a submit button, use standard HTML syntax with the addition of the onClick event handler:
<PRE>
&LTINPUT

   TYPE="submit"
   NAME="<I>objectName</I>"
   VALUE="<I>buttonText</I>"
   [onClick="<I>handlerText</I>"]&GT

</PRE>
<I>VALUE</I> specifies the text to display on the button face and can be accessed using the value property.


<H3>Description</H3>
<P>A submit button causes a form to be submitted.

<P>Clicking a submit button submits a form to the program specified by the form's action property. This action always loads a new page into the client; it may be the same as the current page, if the action so specifies or is not specified.


<H3>Properties</H3>
<LI><A HREF="props.html#name_property" tppabs="http://www.webjx.com#name_property">name</A>
<LI><A HREF="props.html#value_property" tppabs="http://www.webjx.com#value_property">value</A>


<H3>Methods</H3>
<LI><A HREF="methods.html#click_method" tppabs="http://www.webjx.com#click_method">click</A>


<H3>Event handlers</H3>
<LI><A HREF="events.html#onClick_event" tppabs="http://www.webjx.com#onClick_event">onClick</A>


<H3>Examples</H3>
<XMP>
<INPUT TYPE="submit" NAME="submit_button" VALUE="Done">
</XMP>


<H3>See also</H3>
<LI><A HREF=#reset_object>reset</A> and <A HREF=#button_object>button</A> objects


<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="text_object"><H2>text object (client)</H2></A>
<P>A text object is a text input field on an HTML form. A text field lets the user enter a word, phrase, or series of numbers.


<H3>Syntax</H3>
<P>To define a text object, use standard HTML syntax with the addition of the onBlur, on Change, onFocus, and onSelect event handlers:
<PRE>
&LTINPUT

   TYPE="text"
   NAME="<I>objectName</I>"
   VALUE="<I>textValue</I>"
   SIZE=<I>integer</I>
   [onBlur="<I>handlerText</I>"]
   [onChange="<I>handlerText</I>"]
   [onFocus="<I>handlerText</I>"]
   [onSelect="<I>handlerText</I>"]&GT

</PRE>


<H3>Description</H3>
<P>text objects can be updated dynamically by setting this.value
<P>xxx to be supplied


<H3>Properties</H3>
<LI><A HREF="props.html#defaultValue_property" tppabs="http://www.webjx.com#defaultValue_property">defaultValue</A>
<LI><A HREF="props.html#name_property" tppabs="http://www.webjx.com#name_property">name</A>
<LI><A HREF="props.html#value_property" tppabs="http://www.webjx.com#value_property">value</A>


<H3>Methods</H3>
<LI><A HREF="methods.html#focus_method" tppabs="http://www.webjx.com#focus_method">focus</A>
<LI><A HREF="methods.html#blur_method" tppabs="http://www.webjx.com#blur_method">blur</A>
<LI><A HREF="methods.html#select_method" tppabs="http://www.webjx.com#select_method">select</A>


<H3>Event handlers</H3>
<LI><A HREF="events.html#onBlur_event" tppabs="http://www.webjx.com#onBlur_event">onBlur</A>
<LI><A HREF="events.html#onChange_event" tppabs="http://www.webjx.com#onChange_event">onChange</A>
<LI><A HREF="events.html#onFocus_event" tppabs="http://www.webjx.com#onFocus_event">onFocus</A>
<LI><A HREF="events.html#onSelect_event" tppabs="http://www.webjx.com#onSelect_event">onSelect</A>


<H3>Examples</H3>
<XMP>
<B>Last name:</B> <INPUT TYPE="text" NAME="last_name" VALUE="" SIZE=25>
</XMP>


<H3>See also</H3>
<LI><A HREF=#textarea_object>textArea</A> and <A HREF=#string_object>string</A> objects


<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="textArea_object"><H2>textArea object (client)</H2></A>
<P>A textArea object is a multiline input field on an HTML form. A textArea field lets the user enter words, phrases, or numbers.


<H3>Syntax</H3>
<P>To define a text area, use standard HTML syntax with the addition of the onBlur, onChange, onFocus, and onSelect event handlers:
<PRE>
&LTTEXTAREA

   NAME="<I>objectName</I>"
   ROWS="<I>integer</I>"
   COLS="<I>integer</I>"
   [onBlur="<I>handlerText</I>"]
   [onChange="<I>handlerText</I>"]
   [onFocus="<I>handlerText</I>"]
   [onSelect="<I>handlerText</I>"]&GT

   <I>textToDisplay</I>
&LT/TEXTAREA>

</PRE>
<P><I>textToDisplay</I> allows only ASCII text, and new lines are respected.
<BR><I>ROWS</I> and <I>COLS</I> define the physical size of the displayed input field in numbers of characters.


<H3>Description</H3>
<P>textArea objects can be updated dynamically. xxx need to explain how. (see text object)


<H3>Properties</H3>
<LI><A HREF="props.html#defaultValue_property" tppabs="http://www.webjx.com#defaultValue_property">defaultValue</A>
<LI><A HREF="props.html#name_property" tppabs="http://www.webjx.com#name_property">name</A>
<LI><A HREF="props.html#value_property" tppabs="http://www.webjx.com#value_property">value</A>


<H3>Methods</H3>
<LI><A HREF="methods.html#focus_method" tppabs="http://www.webjx.com#focus_method">focus</A>
<LI><A HREF="methods.html#blur_method" tppabs="http://www.webjx.com#blur_method">blur</A>
<LI><A HREF="methods.html#select_method" tppabs="http://www.webjx.com#select_method">select</A>


<H3>Event handlers</H3>
<LI><A HREF="events.html#onBlur_event" tppabs="http://www.webjx.com#onBlur_event">onBlur</A>
<LI><A HREF="events.html#onChange_event" tppabs="http://www.webjx.com#onChange_event">onChange</A>
<LI><A HREF="events.html#onFocus_event" tppabs="http://www.webjx.com#onFocus_event">onFocus</A>
<LI><A HREF="events.html#onSelect_event" tppabs="http://www.webjx.com#onSelect_event">onSelect</A>


<H3>Examples</H3>
<XMP>
<B>Description:</B>
<BR><TEXTAREA NAME="item_description" ROWS=6 COLS=55>
Our storage ottoman provides an attractive way to
store lots of CDs and videos--and it's versatile
enough to store other things as well.

It can hold up to 72 CDs under the lid and 20 videos
in the drawer below.
</TEXTAREA>
</XMP>


<H3>See also</H3>
<LI><A HREF=#text_object>text</A> and <A HREF=#string_object>string</A> objects


<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="window_object"><H2>window object (client)</H2></A>
<P>A window object is the top-level object for each document, location, and history object group.


<H3>Syntax</H3>
xxx to be supplied


<H3>Description</H3>
<P>The window object is the top-level object in the JavaScript client hierarchy. Because the existence of the current window is assumed, you don't have to reference the name of the window when you call its methods and assign its properties. For example, <TT>status="Jump to a new location"</TT> is a valid property assignment, and <TT>close()</TT> is a valid method call.

<P>The self and window properties are synonyms for the current window, and you can optionally use them to refer to the current window. For example, you can close the current window by calling either <TT>window.close()</TT> or <TT>self.close()</TT>. You can use these properties to make your code more readable, or to disambiguate the property assignment <TT>self.status</TT> from a form called <TT>status</TT>.

<P>See the methods and properties listed below for more examples.

<P>You can reference a window's frame objects in your code by using the frames property. The frames property is an array that contains an entry for each frame in a window.


<H3>Properties</H3>
<LI><A HREF="props.html#frames_property" tppabs="http://www.webjx.com#frames_property">frames</A>
<LI><A HREF="props.html#parent_property" tppabs="http://www.webjx.com#parent_property">parent</A>
<LI><A HREF="props.html#self_property" tppabs="http://www.webjx.com#self_property">self</A>
<LI><A HREF="props.html#top_property" tppabs="http://www.webjx.com#top_property">top</A>
<LI><A HREF="props.html#status_property" tppabs="http://www.webjx.com#status_property">status</A>
<LI><A HREF="props.html#defaultStatus_property" tppabs="http://www.webjx.com#defaultStatus_property">defaultStatus</A>


<H3>Methods</H3>
<LI><A HREF="methods.html#alert_method" tppabs="http://www.webjx.com#alert_method">alert</A>
<LI><A HREF="methods.html#close_method" tppabs="http://www.webjx.com#close_method">close</A>
<LI><A HREF="methods.html#confirm_method" tppabs="http://www.webjx.com#confirm_method">confirm</A>
<LI><A HREF="methods.html#open_method" tppabs="http://www.webjx.com#open_method">open</A>
<LI><A HREF="methods.html#prompt_method" tppabs="http://www.webjx.com#prompt_method">prompt</A>
<LI><A HREF="methods.html#setTimeout_method" tppabs="http://www.webjx.com#setTimeout_method">setTimeout</A>
<LI><A HREF="methods.html#clearTimeout_method">clearTimeout</A>


<H3>Event handlers</H3>
<LI><A HREF="events.html#onLoad_method">onLoad</A>
<LI><A HREF="events.html#onUnload_method">onUnload</A>


<H3>Examples</H3>
<P>
xxx to be supplied


<H3>See also</H3>

<LI><A HREF="props.html#frames_property">frames</A> property


<hr>
<p align=center><a href=./index.htm>[返回]</a></p>

</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -