📄 objects.html
字号:
<LI><A HREF="methods.html#setMinutes_method" tppabs="http://www.webjx.com#setMinutes_method">setMinutes</A>
<LI><A HREF="methods.html#setMonth_method" tppabs="http://www.webjx.com#setMonth_method">setMonth</A>
<LI><A HREF="methods.html#setSeconds_method" tppabs="http://www.webjx.com#setSeconds_method">setSeconds</A>
<LI><A HREF="methods.html#setYear_method" tppabs="http://www.webjx.com#setYear_method">setYear</A>
<LI><A HREF="methods.html#toString_method" tppabs="http://www.webjx.com#toString_method">toString</A>
<LI><A HREF="methods.html#toGMTString_method" tppabs="http://www.webjx.com#toGMTString_method">toGMTString</A>
<LI><A HREF="methods.html#toLocaleString_method" tppabs="http://www.webjx.com#toLocaleString_method">toLocaleString</A>
<LI><A HREF="methods.html#UTC_method" tppabs="http://www.webjx.com#UTC_method">UTC</A>
<H3>Event handlers</H3>
<P>
None. Built-in objects do not have event handlers.
<H3>Examples</H3>
<P>
xxx to be supplied
<H3>See also</H3>
<LI>xxx to be supplied
<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="document_object"><H2>document object (client)</H2> </A>
<P>The document object contains information on the current document.
<H3>Syntax</H3>
<! xxx ->
<! xxx need info about color names. See email from Brendan ->
<! xxx ->
<P>To define a document object, use standard HTML syntax with the addition of the onLoad and onUnLoad event handlers:
<PRE>
<BODY
BACKGROUND="<I>backgroundImage</I>"
BGCOLOR="#<I>backgroundColor</I>"
FGCOLOR="#<I>foregroundColor</I>"
LINK="#<I>unfollowedLinkColor</I>"
ALINK="#<I>activatedLinkColor</I>"
VLINK="#<I>followedLinkColor</I>"
[onLoad="<I>handlerText</I>"]
[onUnLoad="<I>handlerText</I>"]>
</BODY>
</PRE>
<P><I>BGCOLOR</I>, <I>FGCOLOR</I>, <I>LINK</I>, <I>ALINK</I>, and <I>VLINK</I> are color names or color specifications in the format "#rrggbb".
<H3>Description</H3>
<P>The <BODY>...</BODY> tag encloses an entire document, which is defined by the current URL. The entire body of the document (all other HTML elements for the document) goes within the <BODY>...</BODY> tag.
<P>You can reference the anchors, forms, and links of a document by using the anchors, forms, and links properties. These properties are arrays that contain an entry for each anchor, form, or link in a document.
<! xxx ->
<! xxx This next paragraph might not be needed. Is it useful? ->
<! xxx ->
<P>The document object's title property reflects the contents of <TITLE>...</TITLE>. Other properties reflect the contents of the document; for example, bgColor reflects the background color, and lastModified reflects the time last modified. Some of the properties are reflections from HTML attributes; for example, the links property is a reflection of all the links in the document, and the forms property is a reflection of all the forms in the document.
<H3>Properties</H3>
<LI><A HREF="props.html#alinkColor_property" tppabs="http://www.webjx.com#alinkColor_property">alinkColor</A>
<LI><A HREF="props.html#anchors_property" tppabs="http://www.webjx.com#anchors_property">anchors</A>
<LI><A HREF="props.html#bgColor_property" tppabs="http://www.webjx.com#bgColor_property">bgColor</A>
<LI><A HREF="props.html#fgColor_property" tppabs="http://www.webjx.com#fgColor_property">fgColor</A>
<LI><A HREF="props.html#forms_property" tppabs="http://www.webjx.com#forms_property">forms</A>
<LI><A HREF="props.html#lastModified_property" tppabs="http://www.webjx.com#lastModified_property">lastModified</A>
<LI><A HREF="props.html#linkColor_property" tppabs="http://www.webjx.com#linkColor_property">linkColor</A>
<LI><A HREF="props.html#links_property" tppabs="http://www.webjx.com#links_property">links</A>
<LI><A HREF="props.html#loadedDate_property" tppabs="http://www.webjx.com#loadedDate_property">loadedDate</A>
<LI><A HREF="props.html#location_property" tppabs="http://www.webjx.com#location_property">location</A>
<LI><A HREF="props.html#referrer_property" tppabs="http://www.webjx.com#referrer_property">referrer</A>
<LI><A HREF="props.html#title_property" tppabs="http://www.webjx.com#title_property">title</A>
<LI><A HREF="props.html#vlinkColor_property" tppabs="http://www.webjx.com#vlinkColor_property">vlinkColor</A>
<H3>Methods</H3>
<LI><A HREF="methods.html#clear_method" tppabs="http://www.webjx.com#clear_method">clear</A>
<LI><A HREF="methods.html#close_method" tppabs="http://www.webjx.com#close_method">close</A>
<LI><A HREF="methods.html#open_method" tppabs="http://www.webjx.com#open_method">open</A>
<LI><A HREF="methods.html#write_method" tppabs="http://www.webjx.com#write_method">write</A>
<LI><A HREF="methods.html#writeln_method" tppabs="http://www.webjx.com#writeln_method">writeln</A>
<H3>Event handlers</H3>
<LI><A HREF="events.html#onLoad_event" tppabs="http://www.webjx.com#onLoad_event">onLoad</A>
<LI><A HREF="events.html#onUnLoad_event" tppabs="http://www.webjx.com#onUnLoad_event">onUnLoad</A>
<H3>Examples</H3>
<P>
xxx to be supplied
<H3>See also</H3>
<LI><A HREF=#window_object>window</A> object
<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="form_object"><H2>form object (client)</H2> </A>
<P>A form lets users input text and make choices from form objects such as checkboxes, radio buttons, and selection lists. You can also use a form to post data to or retrieve data from a server.
<H3>Syntax</H3>
<P>To define a form, use standard HTML syntax with the addition of the onSubmit event handler:
<PRE>
<FORM
NAME="<I>objectName</I>
TARGET="<I>windowName</I>"
ACTION="<I>serverURL</I>"
METHOD=GET | POST
[onSubmit="<I>handlerText</I>"]>
</FORM>
</PRE>
<P><I>TARGET</I> specifies the window that form responses go to. When you submit a form with a TARGET attribute, instead of seeing the server's responses in the same window that contained the form, you see them in a (possibly new) window.
<BR><I>ACTION</I> specifies the URL of the server to which form field input information is sent.
<BR<I>METHOD</I> specifies how information is sent to the server specified by ACTION. GET (the default) appends the input information to the URL which on most receiving systems becomes the value of the environment variable <I>QUERY_STRING</I>. POST sends the input information in a data body which is available on <I>stdin</I> with the data length set in the environment variable <I>CONTENT_LENGTH</I>.
<H3>Description</H3>
<P>
Each form in a document corresponds to a distinct object.
<P>You can reference the form objects in your code by using the forms property of the document object. The forms property is an array that contains an entry for each form in a document.
<P>You can reference a form's elements in your code by using the elements property. The elements property is an array that contains an entry for each element (such as a checkbox, radioButton, or text object) in a form.
<H3>Properties</H3>
<LI><A HREF="props.html#action_property" tppabs="http://www.webjx.com#action_property">action</A>
<LI><A HREF="props.html#elements_property" tppabs="http://www.webjx.com#elements_property">elements</A>
<LI><A HREF="props.html#method_property" tppabs="http://www.webjx.com#method_property">method</A>
<LI><A HREF="props.html#name_property" tppabs="http://www.webjx.com#name_property">name</A>
<LI><A HREF="props.html#target_property" tppabs="http://www.webjx.com#target_property">target</A>
<H3>Methods</H3>
<LI><A HREF="methods.html#submit_method" tppabs="http://www.webjx.com#submit_method">submit</A>
<H3>Event handlers</H3>
<LI><A HREF="events.html#onSubmit_event" tppabs="http://www.webjx.com#onSubmit_event">onSubmit</A>
<H3>Examples</H3>
<P>
xxx to be supplied
<H3>See also</H3>
<LI><A HREF="props.html#elements_property" tppabs="http://www.webjx.com#elements_property">elements</A>, <A HREF="props.html#forms_property" tppabs="http://www.webjx.com#forms_property">forms</A> properties
<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="history_object"><H2>history object (client)</H2> </A>
<! xxx ->
<! xxx Rand says: I haven't been able to get history to work, so don't worry too much about it for now. ->
<! xxx ->
<P>The history object contains information on the URLs that the client has visited.
This information is stored in a history list, and is accessible through the Navigator's
Go menu.
<H3>Syntax</H3>
<PRE>history.go(<I>delta</I>)</PRE>
<I>delta</I> is an integer representing the offset of the destination URL in the history list.
<H3>Description</H3>
<P>The history object is a linked list of URLs the user has visited, as shown in the Navigator's Go menu.
<H3>Properties</H3>
<! xxx ->
<! xxx back and forward properties were removed and might come back as previous and next. ->
<! xxx ->
<LI><A HREF="props.html#current_property" tppabs="http://www.webjx.com#current_property">current</A>
<LI><A HREF="props.html#length_property" tppabs="http://www.webjx.com#length_property">length</A>
<H3>Methods</H3>
<LI><A HREF="methods.html#back_method" tppabs="http://www.webjx.com#back_method">back</A>
<LI><A HREF="methods.html#forward_method" tppabs="http://www.webjx.com#forward_method">forward</A>
<LI><A HREF="methods.html#go_method" tppabs="http://www.webjx.com#go_method">go</A>
<H3>Event handlers</H3>
<P>
None.
<H3>Examples</H3>
<P>The following example goes to the URL the user visited three clicks ago.
<XMP>history.go(-3)</XMP>
<H3>See also</H3>
<LI>xxx to be supplied
<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="link_object"><H2>link object (client)</H2></A>
<P>A link is a piece of text identified as a hypertext link. When the user clicks the link text, the link hypertext reference is loaded into its target window.
<H3>Syntax</H3>
<! xxx ->
<! xxx HTML has a LINK tag. Should that be used here instead of the A tag? ->
<! xxx ->
<P>To define a link, use standard HTML syntax with the addition of the onClick and onMouseOver event handlers:
<PRE>
<A HREF=<I>locationOrURL</I>
TARGET="<I>windowName</I>"
[onClick="<I>handlerText</I>"]
[onMouseOver="<I>handlerText</I>"]>
<I>linkText</I>
</A>
</PRE>
<P><I>HREF</I> identifies a destination anchor or URL.
<BR><I>TARGET</I> specifies the window that the link is loaded into.
<BR><I>linkText</I> is rendered as a hypertext link to the URL.
<H3>Description</H3>
<P>Each link object is a location object.
<P>You can reference the link objects in your code by using the links property of the document object. The links property is an array that contains an entry for each link in a document.
<H3>Properties</H3>
<LI><A HREF="props.html#target_property" tppabs="http://www.webjx.com#target_property">target</A>
<H3>Methods</H3>
<LI>xxx to be supplied
<H3>Event handlers</H3>
<LI><A HREF="events.html#onClick_event" tppabs="http://www.webjx.com#onClick_event">onClick</A>
<LI><A HREF="events.html#onMouseOver_event" tppabs="http://www.webjx.com#onMouseOver_event">onMouseOver</A>
<H3>Examples</H3>
<P>The following example creates a hypertext link to an anchor named <I>javascript_intro</I>.
<XMP>
<A HREF="#javascript_intro">Introduction to JavaScript</A>
</XMP>
<P>The following example creates a hypertext link to a URL.
<XMP>
<A HREF="../../tppmsgs/msgs0.htm#2" tppabs="http://www.netscape.com/">Netscape Home Page</A>
</XMP>
<H3>See also</H3>
<LI><A HREF=#anchor_object>anchor</A> object
<LI><A HREF="props.html#links_property" tppabs="http://www.webjx.com#links_property">links</A> property
<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="location_object"><H2>location object (client)</H2> </A>
<P>The location object contains information on the current URL.
<H3>Syntax</H3>
<PRE>location.<I>property</I></PRE>
<I>property</I> is one of the properties listed below.
<H3>Description</H3>
<P>xxx to be supplied
<H3>Properties</H3>
<LI><A HREF="props.html#hash_property" tppabs="http://www.webjx.com#hash_property">hash</A>
<LI><A HREF="props.html#host_property" tppabs="http://www.webjx.com#host_property">host</A>
<LI><A HREF="props.html#hostname_property" tppabs="http://www.webjx.com#hostname_property">hostname</A>
<LI><A HREF="props.html#href_property" tppabs="http://www.webjx.com#href_property">href</A>
<LI><A HREF="props.html#pathname_property" tppabs="http://www.webjx.com#pathname_property">pathname</A>
<LI><A HREF="props.html#port_property" tppabs="http://www.webjx.com#port_property">port</A>
<LI><A HREF="props.html#protocol_property" tppabs="http://www.webjx.com#protocol_property">protocol</A>
<LI><A HREF="props.html#search_property" tppabs="http://www.webjx.com#search_property">search</A>
<H3>Methods</H3>
<LI><A HREF="methods.html#assign_method" tppabs="http://www.webjx.com#assign_method">assign</A>
<LI><A HREF="methods.html#toString_method" tppabs="http://www.webjx.com#toString_method">toString</A>
<H3>Event handlers</H3>
<P>
None.
<H3>Examples</H3>
<P>
xxx to be supplied
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -