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

📄 lcjsobj.html

📁 javascript 1.5规范
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<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:28">	<TITLE> Core JavaScript Reference 1.5:  </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="lcjsexc.html"><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#993300">Previous</a></FONT>&nbsp;&nbsp;&nbsp;&nbsp;</b><a href="contents.html"><b><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#993300">Contents</a></FONT></b>&nbsp;&nbsp;&nbsp;&nbsp;<a href="ix.html"><b><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#993300">Index</a></FONT></b>&nbsp;&nbsp;&nbsp;&nbsp;<a href="partapp.html"><b><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#993300">Next</a></FONT></b>&nbsp;&nbsp;&nbsp;&nbsp;         </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>      <BR><BR><P><A NAME="1193143"> </A><A NAME="JSObject"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="5"><B><zrefhead1>JSObject</zrefhead1></B></FONT><P><A NAME="1193144"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><zparagraph>The public final class <FONT FACE="courier, couriernew, monospaced size">netscape.javascript.JSObject</FONT> extends <FONT FACE="courier, couriernew, monospaced size">Object</FONT>.</zparagraph></FONT><P><A NAME="1193145"></A><FONT FACE="courier, couriernew, monospaced size" SIZE="2"><zcodeline>java.lang.Object<br>&nbsp;&nbsp;&nbsp;|<br>&nbsp;&nbsp;&nbsp;+----netscape.javascript.JSObject</zcodeline></FONT><P><BR><A NAME="1193426"> </A><A NAME="Description"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><B><zrefheader>Description</zrefheader></B></FONT><BR><A NAME="1195346"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><zparagraph>JavaScript objects are wrapped in an instance of the class <FONT FACE="courier, couriernew, monospaced size">netscape.javascript.JSObject</FONT> and passed to Java. <FONT FACE="courier, couriernew, monospaced size">JSObject</FONT> allows Java to manipulate JavaScript objects.</zparagraph></FONT><P><A NAME="1195303"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><zparagraph>When a JavaScript object is sent to Java, the runtime engine creates a Java wrapper of type <FONT FACE="courier, couriernew, monospaced size">JSObject</FONT>; when a <FONT FACE="courier, couriernew, monospaced size">JSObject</FONT> is sent from Java to JavaScript, the runtime engine unwraps it to its original JavaScript object type. The <FONT FACE="courier, couriernew, monospaced size">JSObject</FONT> class provides a way to invoke JavaScript methods and examine JavaScript properties.</zparagraph></FONT><P><A NAME="1195291"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><zparagraph>Any JavaScript data brought into Java is converted to Java data types. When the JSObject is passed back to JavaScript, the object is unwrapped and can be used by JavaScript code. See the <A HREF="http://developer.netscape.com/docs/manuals/js/core/jsguide/index.htm"><I>Core JavaScript Guide</I></A> for more information about data type conversions.</zparagraph></FONT><P><BR><A NAME="1193160"> </A><A NAME="Method Summary"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><B><zrefheader>Method Summary</zrefheader></B></FONT><BR><A NAME="1193222"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><zparagraph>The <FONT FACE="courier, couriernew, monospaced size">netscape.javascript.JSObject</FONT> class has the following methods:</zparagraph></FONT><P><P><A NAME="1193778"> </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></B></FONT><BR><BR>  <TR BGCOLOR="#CCCCCC" ALIGN=LEFT VALIGN=TOP>    <TH VALIGN=TOP ALIGN=LEFT><A NAME="1193163"> </A><P ALIGN="LEFT"><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><B><ztablehead>Method</ztablehead></B></FONT></TH>    <TH VALIGN=TOP ALIGN=LEFT><A NAME="1193165"> </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="1193170"></A><FONT FACE="courier, couriernew, monospaced size" SIZE="2"><zcodeline><A HREF="lcjsobj.html#1193239"  >call</A></zcodeline></FONT><P>&nbsp;</TD>    <TD VALIGN=TOP><P><A NAME="1193172"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><ztabletext>Calls a JavaScript method.</ztabletext></FONT>&nbsp;</TD>  </TR>  <TR>    <TD VALIGN=TOP><A NAME="1194485"></A><FONT FACE="courier, couriernew, monospaced size" SIZE="2"><zcodeline><A HREF="lcjsobj.html#1194386"  >equals</A></zcodeline></FONT><P>&nbsp;</TD>    <TD VALIGN=TOP><P><A NAME="1194487"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><ztabletext>Determines if two <FONT FACE="courier, couriernew, monospaced size">JSObject</FONT> objects refer to the same instance.</ztabletext></FONT>&nbsp;</TD>  </TR>  <TR>    <TD VALIGN=TOP><A NAME="1193177"></A><FONT FACE="courier, couriernew, monospaced size" SIZE="2"><zcodeline><A HREF="lcjsobj.html#1193245"  >eval</A></zcodeline></FONT><P>&nbsp;</TD>    <TD VALIGN=TOP><P><A NAME="1193179"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><ztabletext>Evaluates a JavaScript expression.</ztabletext></FONT>&nbsp;</TD>  </TR>  <TR>    <TD VALIGN=TOP><A NAME="1193184"></A><FONT FACE="courier, couriernew, monospaced size" SIZE="2"><zcodeline><A HREF="lcjsobj.html#1193251"  >getMember</A></zcodeline></FONT><P>&nbsp;</TD>    <TD VALIGN=TOP><P><A NAME="1193186"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><ztabletext>Retrieves the value of a property of a JavaScript object.</ztabletext></FONT>&nbsp;</TD>  </TR>  <TR>    <TD VALIGN=TOP><A NAME="1193191"></A><FONT FACE="courier, couriernew, monospaced size" SIZE="2"><zcodeline><A HREF="lcjsobj.html#1193257"  >getSlot</A></zcodeline></FONT><P>&nbsp;</TD>    <TD VALIGN=TOP><P><A NAME="1193193"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><ztabletext>Retrieves the value of an array element of a JavaScript object.</ztabletext></FONT>&nbsp;</TD>  </TR>  <TR>    <TD VALIGN=TOP><A NAME="1193198"></A><FONT FACE="courier, couriernew, monospaced size" SIZE="2"><zcodeline><A HREF="lcjsobj.html#1193269"  >removeMember</A></zcodeline></FONT><P>&nbsp;</TD>    <TD VALIGN=TOP><P><A NAME="1193200"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><ztabletext>Removes a property of a JavaScript object.</ztabletext></FONT>&nbsp;</TD>  </TR>  <TR>    <TD VALIGN=TOP><A NAME="1193205"></A><FONT FACE="courier, couriernew, monospaced size" SIZE="2"><zcodeline><A HREF="lcjsobj.html#1193275"  >setMember</A></zcodeline></FONT><P>&nbsp;</TD>    <TD VALIGN=TOP><P><A NAME="1193207"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><ztabletext>Sets the value of a property of a JavaScript object.</ztabletext></FONT>&nbsp;</TD>  </TR>  <TR>    <TD VALIGN=TOP><A NAME="1193212"></A><FONT FACE="courier, couriernew, monospaced size" SIZE="2"><zcodeline><A HREF="lcjsobj.html#1193281"  >setSlot</A></zcodeline></FONT><P>&nbsp;</TD>    <TD VALIGN=TOP><P><A NAME="1193214"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><ztabletext>Sets the value of an array element of a JavaScript object.</ztabletext></FONT>&nbsp;</TD>  </TR>  <TR>    <TD VALIGN=TOP><A NAME="1193219"></A><FONT FACE="courier, couriernew, monospaced size" SIZE="2"><zcodeline><A HREF="lcjsobj.html#1193287"  >toString</A></zcodeline></FONT><P>&nbsp;</TD>    <TD VALIGN=TOP><P><A NAME="1193221"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><ztabletext>Converts a <FONT FACE="courier, couriernew, monospaced size">JSObject</FONT> to a string.</ztabletext></FONT>&nbsp;</TD>  </TR></TABLE><P></FONT><P><A NAME="1193235"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><zparagraph>The <FONT FACE="courier, couriernew, monospaced size">netscape.javascript.JSObject</FONT> class has the following static methods:</zparagraph></FONT><P><P><A NAME="1193828"> </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></B></FONT><BR><BR>  <TR BGCOLOR="#CCCCCC" ALIGN=LEFT VALIGN=TOP>    <TH VALIGN=TOP ALIGN=LEFT><A NAME="1193225"> </A><P ALIGN="LEFT"><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><B><ztablehead>Method</ztablehead></B></FONT></TH>    <TH VALIGN=TOP ALIGN=LEFT><A NAME="1193227"> </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="1193232"></A><FONT FACE="courier, couriernew, monospaced size" SIZE="2"><zcodeline><A HREF="lcjsobj.html#1193263"  >getWindow</A></zcodeline></FONT><P>&nbsp;</TD>    <TD VALIGN=TOP><P><A NAME="1193234"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><ztabletext>Gets a <FONT FACE="courier, couriernew, monospaced size">JSObject</FONT> for the window containing the given applet.</ztabletext></FONT>&nbsp;</TD>  </TR></TABLE><P></FONT><P><A NAME="1193236"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2"><zparagraph>The following sections show the declaration and usage of these methods.</zparagraph></FONT><P><BR><P><A NAME="1193239"> </A><A NAME="call"> </A><FONT FACE="Arial, Helvetica, sans-serif" SIZE="4"><B><zrefhead2>call</zrefhead2></B></FONT><P>

⌨️ 快捷键说明

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