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

📄 ref_a-c.htm

📁 J2EE课程设计资料集合 交你怎么样设计现在流行的J2EE组件开发 JavaScript和servlet开发 怎么样实现页面验证和跳转
💻 HTM
📖 第 1 页 / 共 5 页
字号:
<H3>例子</H3>
<PRE>
// Displays the value 0.7853981633974483
document.write("The arc tangent of 1 is " + Math.atan(1))

// Displays the value -0.7853981633974483
document.write("&ltP&gtThe arc tangent of -1 is " + Math.atan(-1))

// Displays the value 0.4636476090008061
document.write("&ltP&gtThe arc tangent of .5 is " + Math.atan(.5))
</PRE>

<H3>See also</H3>
<LI><A HREF="ref_a-c.htm#acos_method" tppabs="http://www.nease.net/~jim/ref_a-c.htm#acos_method">acos</A>, <A HREF="ref_a-c.htm#asin_method" tppabs="http://www.nease.net/~jim/ref_a-c.htm#asin_method">asin</A>, <A HREF="ref_a-c.htm#cos_method" tppabs="http://www.nease.net/~jim/ref_a-c.htm#cos_method">cos</A>, <A HREF="ref_s-s.htm#sin_method" tppabs="http://www.nease.net/~jim/ref_s-s.htm#sin_method">sin</A>, <A HREF="ref_t-z.htm#tan_method" tppabs="http://www.nease.net/~jim/ref_t-z.htm#tan_method">tan</A> methods
<!------------------------------------------------------------------------------------------------>
<HR>
<A NAME="back_method"><H2>back method</H2></A>
<P>
Loads the previous URL in the history list.

<H3>语法</H3>
<PRE>history.back()</PRE>

<H3>用法</H3>
<P><A HREF="ref_h-l.htm#history_object" tppabs="http://www.nease.net/~jim/ref_h-l.htm#history_object">history</A>

<H3>描述</H3>
<P>This method performs the same action as a user choosing the Back button in the Navigator. The back method is the same as <TT>history.go(-1)</TT>.

<H3>例子</H3>
The following custom buttons perform the same operations as the Navigator Back and Forward buttons:
<PRE>
&ltP&gt&ltINPUT TYPE="button" VALUE="< Back"
   onClick="history.back()"&gt
&ltP&gt&ltINPUT TYPE="button" VALUE="> Forward"
   onClick="history.forward()"&gt
</PRE>

<H3>See also</H3>
<LI><A HREF="ref_f-g.htm#forward_method" tppabs="http://www.nease.net/~jim/ref_f-g.htm#forward_method">forward</A>, <A HREF="ref_f-g.htm#go_method" tppabs="http://www.nease.net/~jim/ref_f-g.htm#go_method">go</A> methods
<!------------------------------------------------------------------------------------------------>
<HR>
<A NAME="bgColor_property"><H2>bgColor property</H2></A>
<P>
A string specifying the color of the document background.

<H3>语法</H3>
<PRE>document.bgColor</PRE>

<H3>Property of</H3>
<P><A HREF="ref_d-e.htm#document_object" tppabs="http://www.nease.net/~jim/ref_d-e.htm#document_object">document</A>

<H3>描述</H3>
<P>The bgColor property is expressed as a hexadecimal RGB triplet or as one of the string literals listed in <A HREF="tppmsgs/msgs0.htm#11" tppabs="http://www.nease.net/~jim/colors.htm">Color Values</A>. This property is the JavaScript reflection of the BGCOLOR attribute of the &ltBODY&gt 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.

<P>You can set the bgColor property at any time.

<P>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".

<H3>例子</H3>
<P>The following example sets the color of the document background to aqua using a string literal:
<PRE>
document.bgColor="aqua"
</PRE>

<P>The following example sets the color of the document background to aqua using a hexadecimal triplet:
<PRE>
document.bgColor="00FFFF"
</PRE>

<H3>See also</H3>
<LI><A HREF="ref_a-c.htm#alinkColor_property" tppabs="http://www.nease.net/~jim/ref_a-c.htm#alinkColor_property">alinkColor</A>, <A HREF="ref_f-g.htm#fgColor_property" tppabs="http://www.nease.net/~jim/ref_f-g.htm#fgColor_property">fgColor</A>, <A HREF="ref_h-l.htm#linkColor_property" tppabs="http://www.nease.net/~jim/ref_h-l.htm#linkColor_property">linkColor</A>, and <A HREF="ref_t-z.htm#vlinkColor_property" tppabs="http://www.nease.net/~jim/ref_t-z.htm#vlinkColor_property">vlinkColor</A> properties
<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="big_method"><H2>big method</H2></A>
<P>
Causes a string to be displayed in a big font as if it were in a &LTBIG&GT tag.

<H3>语法</H3>
<PRE><I>stringName</I>.big()</PRE>
<P><I>stringName</I> is any string or a property of an existing object.

<H3>用法</H3>
<P><A HREF="ref_s-s.htm#string_object" tppabs="http://www.nease.net/~jim/ref_s-s.htm#string_object">string</A>

<H3>描述</H3>
<P>Use the big method with the write or writeln methods to format and display a string in a document.

<H3>例子</H3>
The following example uses string methods to change the size of a string:
<PRE>
var worldString="Hello, world"

document.write(worldString.small())
document.write("&ltP&gt" + worldString.big())
document.write("&ltP&gt" + worldString.fontsize(7))
</PRE>

<P>The previous example produces the same output as the following htm:
<XMP>
<SMALL>Hello, world</SMALL>
<P><BIG>Hello, world</BIG>
<P><FONTSIZE=7>Hello, world</FONTSIZE>
</XMP>

<H3>See also</H3>
<LI><A HREF="ref_f-g.htm#fontsize_method" tppabs="http://www.nease.net/~jim/ref_f-g.htm#fontsize_method">fontsize</A>, <A HREF="ref_s-s.htm#small_method" tppabs="http://www.nease.net/~jim/ref_s-s.htm#small_method">small</A> methods
<!------------------------------------------------------------------------------------------------>
<HR>
<A NAME="blink_method"><H2>blink method</H2></A>
<P>
Causes a string to blink as if it were in a &ltBLINK&gt tag.

<H3>语法</H3>
<PRE><I>stringName</I>.blink()</PRE>
<P><I>stringName</I> is any string or a property of an existing object.


<H3>用法</H3>
<P><A HREF="ref_s-s.htm#string_object" tppabs="http://www.nease.net/~jim/ref_s-s.htm#string_object">string</A>

<H3>描述</H3>
<P>Use the blink method with the write or writeln methods to format and display a string in a document.

<H3>例子</H3>
The following example uses string methods to change the formatting of a string:
<PRE>
var worldString="Hello, world"

document.write(worldString.blink())
document.write("&ltP&gt" + worldString.bold())
document.write("&ltP&gt" + worldString.italics())
document.write("&ltP&gt" + worldString.strike())
</PRE>

<P>The previous example produces the same output as the following htm:
<XMP>
<BLINK>Hello, world</BLINK>
<P><B>Hello, world</B>
<P><I>Hello, world</I>
<P><STRIKE>Hello, world</STRIKE>
</XMP>

<H3>See also</H3>
<LI><A HREF="ref_a-c.htm#bold_method" tppabs="http://www.nease.net/~jim/ref_a-c.htm#bold_method">bold</A>, <A HREF="ref_h-l.htm#italics_method" tppabs="http://www.nease.net/~jim/ref_h-l.htm#italics_method">italics</A>, <A HREF="ref_s-s.htm#strike_method" tppabs="http://www.nease.net/~jim/ref_s-s.htm#strike_method">strike</A> methods
<!------------------------------------------------------------------------------------------------>
<HR>
<A NAME="blur_method"><H2>blur method</H2></A>
<P>
Removes focus from the specified object.

<H3>语法</H3>
<PRE>
1. <I>passwordName</I>.blur()
2. <I>selectName</I>.blur()
3. <I>textName</I>.blur()
4. <I>textareaName</I>.blur()
</PRE>
<P><I>passwordName</I> is either the value of the NAME attribute of a password object or an element in the <I>elements</I> array.
<BR><I>selectName</I> is either the value of the NAME attribute of a select object or an element in the <I>elements</I> array.
<BR><I>textName</I> is either the value of the NAME attribute of a text object or an element in the <I>elements</I> array.
<BR><I>textareaName</I> is either the value of the NAME attribute of a textarea object or an element in the <I>elements</I> array.

<H3>用法</H3>
<P><A HREF="ref_m-q.htm#password_object" tppabs="http://www.nease.net/~jim/ref_m-q.htm#password_object">password</A>, <A HREF="ref_s-s.htm#select_object" tppabs="http://www.nease.net/~jim/ref_s-s.htm#select_object">select</A>, <A HREF="ref_t-z.htm#text_object" tppabs="http://www.nease.net/~jim/ref_t-z.htm#text_object">text</A>, <A HREF="ref_t-z.htm#textarea_object" tppabs="http://www.nease.net/~jim/ref_t-z.htm#textarea_object">textarea</A>

<H3>描述</H3>
<P>Use the blur method to remove focus from a specific form element.

<H3>例子</H3>
<P>The following example removes focus from the password element <I>userPass</I>:
<PRE>
userPass.blur()
</PRE>
This example assumes that the password is defined as:
<PRE>&ltINPUT TYPE="password" NAME="userPass"&gt</PRE>

<H3>See also</H3>
<LI><A HREF="ref_f-g.htm#focus_method" tppabs="http://www.nease.net/~jim/ref_f-g.htm#focus_method">focus</A>, <A HREF="ref_s-s.htm#select_method" tppabs="http://www.nease.net/~jim/ref_s-s.htm#select_method">select</A> methods
<!------------------------------------------------------------------------------------------------>
<HR>
<A NAME="bold_method"><H2>bold method</H2></A>
<P>
Causes a string to be displayed as bold as if it were in a &LTB&GT tag.

<H3>语法</H3>
<PRE><I>stringName</I>.bold()</PRE>
<P><I>stringName</I> is any string or a property of an existing object.

<H3>用法</H3>
<P><A HREF="ref_s-s.htm#string_object" tppabs="http://www.nease.net/~jim/ref_s-s.htm#string_object">string</A>

<H3>描述</H3>
<P>Use the bold method with the write or writeln methods to format and display a string in a document.

<H3>例子</H3>
The following example uses string methods to change the formatting of a string:
<PRE>
var worldString="Hello, world"

document.write(worldString.blink())
document.write("&ltP&gt" + worldString.bold())
document.write("&ltP&gt" + worldString.italics())
document.write("&ltP&gt" + worldString.strike())
</PRE>

<P>The previous example produces the same output as the following htm:
<PRE>
<TT>&ltBLINK&gtHello, world&lt/BLINK&gt</TT>
<TT>&ltP&gt&ltB&gtHello, world&lt/B&gt</TT>
<TT>&ltP&gt&ltI&gtHello, world&lt/I&gt</TT>
<TT>&ltP&gt&ltSTRIKE&gtHello, world&lt/STRIKE&gt</TT>
</PRE>

<H3>See also</H3>
<LI><A HREF="ref_a-c.htm#blink_method" tppabs="http://www.nease.net/~jim/ref_a-c.htm#blink_method">blink</A>, <A HREF="ref_h-l.htm#italics_method" tppabs="http://www.nease.net/~jim/ref_h-l.htm#italics_method">italics</A>, <A HREF="ref_s-s.htm#strike_method" tppabs="http://www.nease.net/~jim/ref_s-s.htm#strike_method">strike</A> methods
<!------------------------------------------------------------------------------------------------>
<HR>
<A NAME="button_object"><H2>button object</H2></A>
<P>A pushbutton on an htm form.


<H3>语法</H3>
<P>To define a button:
<PRE>
&LTINPUT
   TYPE="button"
   NAME="<I>buttonName</I>"

⌨️ 快捷键说明

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