<HTML>
<body background="ee.jpg">
<A NAME="methods"><H1>JavaScript的方法</H1></A>
<P>以下的一些"方法"可用在JavaScript:
<TABLE width=70%>
<TR>
<TD>
<LI><A HREF=#abs_method>abs</A>
<LI><A HREF=#acos_method>acos</A>
<LI><A HREF=#alert_method>alert</A>
<LI><A HREF=#anchor_method>anchor</A>
<LI><A HREF=#asin_method>asin</A>
<LI><A HREF=#assign_method>assign</A>
<LI><A HREF=#atan_method>atan</A>
<LI><A HREF=#back_method>back</A>
<LI><A HREF=#big_method>big</A>
<LI><A HREF=#blink_method>blink</A>
<LI><A HREF=#blur_method>blur</A>
<LI><A HREF=#bold_method>bold</A>
<LI><A HREF=#ceil_method>ceil</A>
<LI><A HREF=#charAt_method>charAt</A>
<LI><A HREF=#clear_method>clear</A>
</TD>
<TD>
<LI><A HREF=#clearTimeout_method>clearTimeout</A>
<LI><A HREF=#click_method>click</A>
<LI><A HREF=#close_method>close</A>
<LI><A HREF=#confirm_method>confirm</A>
<LI><A HREF=#cos_method>cos</A>
<LI><A HREF=#eval_method>eval</A>
<LI><A HREF=#exp_method>exp</A>
<LI><A HREF=#fixed_method>fixed</A>
<LI><A HREF=#floor_method>floor</A>
<LI><A HREF=#focus_method>focus</A>
<LI><A HREF=#fontcolor_method>fontcolor</A>
<LI><A HREF=#fontsize_method>fontsize</A>
<LI><A HREF=#forward_method>forward</A>
<LI><A HREF=#getDate_method>getDate</A>
<LI><A HREF=#getDay_method>getDay</A>
</TD>
<TD>
<LI><A HREF=#getHours_method>getHours</A>
<LI><A HREF=#getMinutes_method>getMinutes</A>
<LI><A HREF=#getMonth_method>getMonth</A>
<LI><A HREF=#getSeconds_method>getSeconds</A>
<LI><A HREF=#getTime_method>getTime</A>
<LI><A HREF=#getTimezoneOffset_method>getTimeZoneoffset</A>
<LI><A HREF=#getYear_method>getYear</A>
<LI><A HREF=#go_method>go</A>
<LI><A HREF=#indexOf_method>indexOf</A>
<LI><A HREF=#italics_method>italics</A>
<LI><A HREF=#lastIndexOf_method>lastIndexOf</A>
<LI><A HREF=#link_method>link</A>
<LI><A HREF=#log_method>log</A>
<LI><A HREF=#max_method>max</A>
<LI><A HREF=#min_method>min</A>
</TD>
<TD>
<LI><A HREF=#open_method>open</A>
<LI><A HREF=#parse_method>parse</A>
<LI><A HREF=#pow_method>pow</A>
<LI><A HREF=#prompt_method>prompt</A>
<LI><A HREF=#random_method>random</A>
<LI><A HREF=#round_method>round</A>
<LI><A HREF=#select_method>select</A>
<LI><A HREF=#setDate_method>setDate</A>
<LI><A HREF=#setHours_method>setHours</A>
<LI><A HREF=#setMinutes_method>setMinutes</A>
<LI><A HREF=#setMonth_method>setMonth</A>
<LI><A HREF=#setSeconds_method>setSeconds</A>
<LI><A HREF=#setTimeout_method>setTimeout</A>
<LI><A HREF=#setTime_method>setTime</A>
<LI><A HREF=#setYear_method>setYear</A>
<LI><A HREF=#sin_method>sin</A>
</TD>
<TD>
<LI><A HREF=#small_method>small</A>
<LI><A HREF=#sqrt_method>sqrt</A>
<LI><A HREF=#strike_method>strike</A>
<LI><A HREF=#sub_method>sub</A>
<LI><A HREF=#submit_method>submit</A>
<LI><A HREF=#substring_method>substring</A>
<LI><A HREF=#sup_method>sup</A>
<LI><A HREF=#tan_method>tan</A>
<LI><A HREF=#toGMTString_method>toGMTString</A>
<LI><A HREF=#toLocaleString_method>toLocaleString</A>
<LI><A HREF=#toLowerCase_method>toLowerCase</A>
<LI><A HREF=#toString_method>toString</A>
<LI><A HREF=#toUpperCase_method>toUpperCase</A>
<LI><A HREF=#UTC_method>UTC</A>
<LI><A HREF=#write_method>write</A>
<LI><A HREF=#writeln_method>writeln</A>
</TD>
</TR>
</TABLE>
<!------------------------------------------------------------------------------------------------>
<HR>
<A NAME="abs_method"><H2>abs method</H2></A>
<P>Returns the absolute value of its argument.
<H3>Syntax</H3>
<PRE>abs(<I>arg</I>)</PRE>
<H3>Applies to</H3>
<P><A HREF="objects.html#Math_object" tppabs="http://202.96.217.5/~xiaoyi/objects.html#Math_object">Math</A>
<H3>Examples</H3>
<P>xxx Examples to be supplied.
<!------------------------------------------------------------------------------------------------>
<HR>
<A NAME="acos_method"><H2>acos method</H2></A>
<P>Returns the arc cosine (in radians) of its argument.
<H3>Syntax</H3>
<PRE>acos(<I>arg</I>)</PRE>
<H3>Applies to</H3>
<P><A HREF="objects.html#Math_object" tppabs="http://202.96.217.5/~xiaoyi/objects.html#Math_object">Math</A>
<H3>Examples</H3>
<P>xxx Examples to be supplied.
<H3>See also</H3>
<LI><A HREF=#asin_method>asin</A>, <A HREF=#atan_method>atan</A>, <A HREF=#cos_method>cos</A>,
<A HREF=#sin_method>sin</A>, <A HREF=#tan_method>tan</A> methods
<!------------------------------------------------------------------------------------------------>
<HR>
<A NAME="alert_method"><H2>alert method</H2></A>
<P>
Displays an Alert dialog box with a message and an OK button.
<H3>Syntax</H3>
<PRE>alert("<I>message</I>")</PRE>
<P>The argument <I>message</I> is any string.
<H3>Description</H3>
<P>Use the alert method to display a message that does not require a user decision. The <I>message</I> argument specifies a message that the dialog box contains.
<H3>Applies to</H3>
<P><A HREF="objects.html#window_object" tppabs="http://202.96.217.5/~xiaoyi/objects.html#window_object">window</A>
<H3>Examples</H3>
<P>In the following example, the testValue function checks the name entered by a user in the text element of a form to make sure that it is no more than eight characters in length. This example uses the alert method to prompt the user of an application to enter a valid value.
<PRE>
function testValue(textElement) {
if (textElement.length > 8) {
alert("Please enter a name that is 8 characters or less")
}
}</PRE>
You can call the testValue function in the onBlur event handler of a form's text element, as shown in the following example:
<PRE>Name: <INPUT TYPE="text" NAME="userName" onBlur="testValue(userName)"></PRE>
<H3>See also</H3>
<LI><A HREF=#confirm_method>confirm</A>, <A HREF=#prompt_method>prompt</A> methods
<!------------------------------------------------------------------------------------------------>
<HR>
<A NAME="anchor_method"><H2>anchor method</H2></A>
<P>
Causes the calling string object to be a named anchor by surrounding it with HTML anchor tags, <TT> <A NAME=...> </A>.</TT>
<H3>Syntax</H3>
<PRE>string.anchor(<I>name</I>)</PRE>
<P>The argument <I>name</I> can be any string.
<H3>Description</H3>
<P>xxx Description to be supplied.
<H3>Applies to</H3>
<P><A HREF="objects.html#string_object" tppabs="http://202.96.217.5/~xiaoyi/objects.html#string_object">string</A>
<H3>Examples</H3>
<P>xxx Examples to be supplied.
<H3>See also</H3>
<LI><A HREF=#link_method>link</A> method
<!------------------------------------------------------------------------------------------------>
<HR>
<A NAME="asin_method"><H2>asin method</H2></A>
<P>
Returns the arc sine (in radians) of its argument.
<H3>Syntax</H3>
<PRE>asin(<I>arg</I>)</PRE>
<H3>Applies to</H3>
<P><A HREF="objects.html#Math_object" tppabs="http://202.96.217.5/~xiaoyi/objects.html#Math_object">Math</A>
<H3>Examples</H3>
<P>xxx Examples to be supplied.
<H3>See also</H3>
<LI><A HREF=#acos_method>acos</A>, <A HREF=#atan_method>atan</A>, <A HREF=#cos_method>cos</A>, <A HREF=#sin_method>sin</A>, <A HREF=#tan_method>tan</A> methods
<!------------------------------------------------------------------------------------------------>
<HR>
<A NAME="assign_method"><H2>assign method</H2></A>
<P>
Sets <b>location.href</b> so you don't have to type ".href" complements <b>toString()</b>.
<H3>Syntax</H3>
<PRE>assign()</PRE>
<H3>Description</H3>
<P>Do not call the assign method. It exists so you can use <TT>'location=...'</TT> instead of <TT>'location.href=...'</TT>.
<! xxx We put in Brendan's comments, but we need more information about the assign method so we can explain it properly.
<P>xxx Description to be supplied.
<H3>Applies to</H3>
<P><A HREF="objects.html#location_object" tppabs="http://202.96.217.5/~xiaoyi/objects.html#location_object">location</A>
<H3>Examples</H3>
<P>xxx Examples to be supplied.
<!-----------------------------------------------------------------------------
javascript详解
需积分: 9 161 浏览量
2007-12-27
13:02:48
上传
评论 1
收藏 64KB ZIP 举报
腾飞说架构
- 粉丝: 3
- 资源: 8
最新资源
- 装修通用报价参考,基础施工项目+水电工程项目+瓦木项目,超级详细
- 三菱PLC例程源码Medocsequencegenerator
- 三菱PLC例程源码M1320磨头进出FX1s控制步进电机,有注释
- STRASSEN矩阵乘法算法(改进分治法·C语言)
- 前端.xmind前端.xmind前端.xmind前端.xmind前端.xmind
- 三菱PLC例程源码LOW-E玻璃镀膜线程序(三菱QPLC的)一万步带注释
- 三菱PLC例程源码LCD设备蚀刻机程序
- 三菱PLC例程源码LCD设备蚀刻机
- 全面前端开发指南:从基础到深入
- pvk2pfx 32位 Pvk2Pfx (Pvk2Pfx.exe) 是一种命令行工具,可将 .spc、.cer 和 .pvk 文
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈