?? toplev.html
字號:
<HTML><HEAD> <META NAME="keywords" CONTENT="electronic commerce, ecommerce, ebusiness, e-business, e-commerce, enterprise software, net economy, Netscape, Sun Microsystems, Sun-Netscape Alliance, iPlanet, internet software"> <META NAME="description" CONTENT="The Sun-Netscape Alliance, a strategic alliance formed by America Online and Sun Microsystems, Inc., is delivering iPlanet e-commerce software and enterprise solutions that enable companies to compete successfully in the Net Economy"> <META HTTP-EQUIV="Content-Type" content="text/html; charset=ISO-8859-1"> <META NAME="TEMPLATEBASE" CONTENT="Authored in FrameMaker. Converted to HTML in WebWorks Publisher 2000. manual wdt 1.5"> <META NAME="LASTUPDATED" CONTENT="09/28/00 13:16:08"> <TITLE> Core JavaScript Reference 1.5: 2 Top-Level Properties and Functions</TITLE></HEAD><BODY TEXT="#000000" LINK="#666699" VLINK="#666699" ALINK="#333366" BGCOLOR="#FFFFFF"><MAINCONTENT><NAVIGATIONCONTENT> <TABLE WIDTH="100%" BORDER="0" CELLSPACING="4"> <TR> <TD VALIGN="TOP"> <b><a href="sun.html"><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#993300">Previous</a></FONT> </b><a href="contents.html"><b><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#993300">Contents</a></FONT></b> <a href="ix.html"><b><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#993300">Index</a></FONT></b> <a href="partlang.html"><b><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#993300">Next</a></FONT></b> </TD> </TR> <TR> <TD VALIGN="TOP" ALIGN="RIGHT" BGCOLOR="#CCCCCC"> <FONT FACE="Arial, Helvetica, sans-serif" COLOR="#000000" SIZE="2"><B> Core JavaScript Reference 1.5</B></FONT> </TD> </TR> <TR> </TABLE> <BR></NAVIGATIONCONTENT><BOOKCONTENT> <blockquote><BR><BR> <A NAME="1061889"> </A><A NAME=""> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="4" COLOR="#666666"><B><zchapnumber>Chapter 2 </zchapnumber> </B></FONT><A NAME="1061890"> </A><A NAME="Top-Level Properties and Functions"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="4" COLOR="#000000"><B><zchaptitle>Chapter 2 Top-Level Properties and Functions</zchaptitle></B></FONT><BR><BR><BR><A NAME="1065959"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><zparagraph>This chapter contains all JavaScript properties and functions not associated with any object. In the ECMA specification, these properties and functions are referred to as properties and methods of the global object.</zparagraph></FONT><P><A NAME="1063329"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><zparagraph>The following table summarizes the top-level properties.</zparagraph></FONT><P><P><A NAME="1066070"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><BR><P><TABLE WIDTH="90%" BORDER="1" CELLPADDING="5" CELLSPACING="0"> <CAPTION></CAPTION><P><FONT FACE=""><B><A NAME="1063308"> </A><A NAME="Top-level properties"> </A><ALIGN="LEFT"><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><B><ztablecaption>Table 2.1    Top-level properties</ztablecaption></B></FONT></B></FONT><BR><BR> <TR BGCOLOR="#CCCCCC" ALIGN=LEFT VALIGN=TOP> <TH VALIGN=TOP ALIGN=LEFT><A NAME="1063312"> </A><P ALIGN="LEFT"><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><B><ztablehead>Property</ztablehead></B></FONT></TH> <TH VALIGN=TOP ALIGN=LEFT><A NAME="1063314"> </A><P ALIGN="LEFT"><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><B><ztablehead>Description</ztablehead></B></FONT></TH> </DIV></TR> <TR> <TD VALIGN=TOP><A NAME="1063319"></A><FONT FACE="courier, couriernew, monospaced size" SIZE="2"><zcodeline><A HREF="toplev.htm#1063963" >Infinity</A></zcodeline></FONT><P> </TD> <TD VALIGN=TOP><P><A NAME="1063321"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><ztabletext>A numeric value representing infinity.</ztabletext></FONT> </TD> </TR> <TR> <TD VALIGN=TOP><A NAME="1063326"></A><FONT FACE="courier, couriernew, monospaced size" SIZE="2"><zcodeline><A HREF="toplev.htm#1064064" >NaN</A></zcodeline></FONT><P> </TD> <TD VALIGN=TOP><P><A NAME="1063328"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><ztabletext>A value representing Not-A-Number.</ztabletext></FONT> </TD> </TR> <TR> <TD VALIGN=TOP><A NAME="1094770"></A><FONT FACE="courier, couriernew, monospaced size" SIZE="2"><zcodeline><A HREF="toplev.htm#1094680" >undefined</A></zcodeline></FONT><P> </TD> <TD VALIGN=TOP><P><A NAME="1094772"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><ztabletext>The value undefined.</ztabletext></FONT> </TD> </TR></TABLE><P></FONT><P><A NAME="1063525"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><zparagraph>The following table summarizes the top-level functions.</zparagraph></FONT><P><P><A NAME="1113271"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><BR><P><TABLE WIDTH="90%" BORDER="1" CELLPADDING="5" CELLSPACING="0"> <CAPTION></CAPTION><P><FONT FACE=""><B><A NAME="1119944"> </A><A NAME="Top-level functions"> </A><ALIGN="LEFT"><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><B><ztablecaption>Table 2.2    Top-level functions</ztablecaption></B></FONT></B></FONT><BR><BR> <TR BGCOLOR="#CCCCCC" ALIGN=LEFT VALIGN=TOP> <TH VALIGN=TOP ALIGN=LEFT><A NAME="1119948"> </A><P ALIGN="LEFT"><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><B><ztablehead>Function</ztablehead></B></FONT></TH> <TH VALIGN=TOP ALIGN=LEFT><A NAME="1119950"> </A><P ALIGN="LEFT"><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><B><ztablehead>Description</ztablehead></B></FONT></TH> </DIV></TR> <TR> <TD VALIGN=TOP><A NAME="1121134"></A><FONT FACE="courier, couriernew, monospaced size" SIZE="2"><zcodeline>decodeURI</zcodeline></FONT><P> </TD> <TD VALIGN=TOP><P><A NAME="1121136"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><ztabletext>Decodes a URI which has been encoded with encodeURI.</ztabletext></FONT> </TD> </TR> <TR> <TD VALIGN=TOP><A NAME="1121138"></A><FONT FACE="courier, couriernew, monospaced size" SIZE="2"><zcodeline>decodeURIComponent</zcodeline></FONT><P> </TD> <TD VALIGN=TOP><P><A NAME="1121140"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><ztabletext>Decodes a URI which has been encoded with encodeURIComponent</ztabletext></FONT> </TD> </TR> <TR> <TD VALIGN=TOP><A NAME="1120234"></A><FONT FACE="courier, couriernew, monospaced size" SIZE="2"><zcodeline>encodeURI</zcodeline></FONT><P> </TD> <TD VALIGN=TOP><P><A NAME="1120236"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><ztabletext>Computes a new version of a complete URI replacing each instance of certain characters with escape sequences representing the UTF-8 encoding of the characters.</ztabletext></FONT> </TD> </TR> <TR> <TD VALIGN=TOP><A NAME="1120238"></A><FONT FACE="courier, couriernew, monospaced size" SIZE="2"><zcodeline>encodeURIComponent</zcodeline></FONT><P> </TD> <TD VALIGN=TOP><P><A NAME="1120240"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><ztabletext>Computes a new version of components of a URI replacing each instance of certain characters with escape sequences representing the UTF-8 encoding of the characters.</ztabletext></FONT> </TD> </TR> <TR> <TD VALIGN=TOP><A NAME="1120020"></A><FONT FACE="courier, couriernew, monospaced size" SIZE="2"><zcodeline><A HREF="toplev.htm#1063795" >eval</A></zcodeline></FONT><P> </TD> <TD VALIGN=TOP><P><A NAME="1120022"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><ztabletext>Evaluates a string of JavaScript code without reference to a particular object.</ztabletext></FONT> </TD> </TR> <TR> <TD VALIGN=TOP><A NAME="1120048"></A><FONT FACE="courier, couriernew, monospaced size" SIZE="2"><zcodeline><A HREF="toplev.htm#1063988" >isFinite</A></zcodeline></FONT><P> </TD> <TD VALIGN=TOP><P><A NAME="1120050"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><ztabletext>Evaluates an argument to determine whether it is a finite number.</ztabletext></FONT> </TD> </TR> <TR> <TD VALIGN=TOP><A NAME="1120055"></A><FONT FACE="courier, couriernew, monospaced size" SIZE="2"><zcodeline><A HREF="toplev.htm#1064024" >isNaN</A></zcodeline></FONT><P> </TD> <TD VALIGN=TOP><P><A NAME="1120057"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><ztabletext>Evaluates an argument to determine if it is not a number.</ztabletext></FONT> </TD> </TR> <TR> <TD VALIGN=TOP><A NAME="1120062"></A><FONT FACE="courier, couriernew, monospaced size" SIZE="2"><zcodeline><A HREF="toplev.htm#1064092" >Number</A></zcodeline></FONT><P> </TD> <TD VALIGN=TOP><P><A NAME="1120064"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><ztabletext>Converts an object to a number.</ztabletext></FONT> </TD> </TR> <TR> <TD VALIGN=TOP><A NAME="1120069"></A><FONT FACE="courier, couriernew, monospaced size" SIZE="2"><zcodeline><A HREF="toplev.htm#1064132" >parseFloat</A></zcodeline></FONT><P> </TD> <TD VALIGN=TOP><P><A NAME="1120071"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><ztabletext>Parses a string argument and returns a floating-point number.</ztabletext></FONT> </TD> </TR> <TR> <TD VALIGN=TOP><A NAME="1120076"></A><FONT FACE="courier, couriernew, monospaced size" SIZE="2"><zcodeline><A HREF="toplev.htm#1064173" >parseInt</A></zcodeline></FONT><P> </TD> <TD VALIGN=TOP><P><A NAME="1120078"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><ztabletext>Parses a string argument and returns an integer.</ztabletext></FONT> </TD> </TR> <TR> <TD VALIGN=TOP><A NAME="1120118"></A><FONT FACE="courier, couriernew, monospaced size" SIZE="2"><zcodeline><A HREF="toplev.htm#1064506" >String</A></zcodeline></FONT><P> </TD> <TD VALIGN=TOP><P><A NAME="1120120"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><ztabletext>Converts an object to a string.</ztabletext></FONT> </TD> </TR></TABLE><P></FONT><P><BR><BR><A NAME="1120957"> </A><A NAME="decodeURI"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="4"><zhead1>decodeURI</zhead1><HR SIZE="2" NOSHADE></FONT><BR><A NAME="1120961"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><zparagraph>Decodes a Uniform Resource Identifier (URI) previously created by <A HREF="toplev.htm#1118346" >encodeURI</A> or by a similar routine.<BR><P><TABLE WIDTH="90%" BORDER="1" CELLPADDING="5" CELLSPACING="0"> <CAPTION></CAPTION><P><FONT FACE=""><B></B></FONT><BR><BR> <TR> <TD VALIGN=TOP><P><A NAME="1120964"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><ztabletext><I>Core function</I></ztabletext></FONT> </TD> <TD VALIGN=TOP><P><A NAME="1120966"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><ztabletext></ztabletext></FONT> </TD> </TR> <TR> <TD VALIGN=TOP><P><A NAME="1120968"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><ztabletext><I>Implemented in</I></ztabletext></FONT> </TD> <TD VALIGN=TOP><P><A NAME="1120970"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><ztabletext>JavaScript 1.5, NES 6.0</ztabletext></FONT> </TD> </TR> <TR> <TD VALIGN=TOP><P><A NAME="1120972"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><ztabletext><I>ECMA version</I></ztabletext></FONT> </TD> <TD VALIGN=TOP><P><A NAME="1120974"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><ztabletext>ECMA-262 Edition 3.</ztabletext></FONT> </TD> </TR></TABLE><P></zparagraph></FONT><P><BR><A NAME="1120975"> </A><A NAME="Syntax"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><B><zrefheader>Syntax</zrefheader></B></FONT><BR><A NAME="1120976"></A><FONT FACE="courier, couriernew, monospaced size" SIZE="2"><zcodeline>decodeURI(encodedURI)</zcodeline></FONT><P><BR><A NAME="1120977"> </A><A NAME="Parameters"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><B>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -