00000001.htm
来自「水木清华BBS」· HTM 代码 · 共 677 行 · 第 1/5 页
HTM
677 行
the codebase of the applet. Java Plug-in knows where to download <BR>the applet or JavaBeans component because it can read this <BR>information from the parameters. The parameter type is not <BR>mapped from the APPLET tag, but it is required in the OBJECT tag. <BR>It identifies the type of the Java executable, such as an applet <BR>or a JavaBean, so Java Plug-in knows how to initialize the Java <BR>executable. These three PARAM tags (code, codebase, and type) in <BR>the above example are specified by Java Plug-in. They do not exist <BR>in the PARAM of the original APPLET tag. Note that the model <BR>parameter within the OBJECT tag is identical to the model parameter <BR>inside the APPLET tag. Except for these first three parameters <BR>specified for Java Plug-in, the remainder of the parameters are <BR>the same as those inside the APPLET tag. <BR>The text "No JDK 1.2 support for APPLET!!" in the APPLET tag is <BR>mapped inside the <OBJECT> and </OBJECT> tags. Originally, this <BR>text is displayed only if the browser does not have Java support. <BR>By mapping it inside the OBJECT tag, this text will displayed if <BR>the browser does not support the OBJECT tag. <BR>The APPLET-OBJECT tag attributes mapping is as follows: <BR> <BR>Attributes APPLET tag support OBJECT tag support Attribute map <BR>in OBJECT tag <BR>ALIGN X X Attribute ALIGN <BR>ALT X <BR>ARCHIVE X Param archive <BR>CODE X X Param code <BR>CODEBASE X X Param codebase <BR>HEIGHT X X Attribute HEIGHT <BR>HSPACE X X Attribute HSPACE <BR>NAME X X Attribute NAME, Param NAME <BR>OBJECT X Param object <BR>TITLE X X Attribute TITLE <BR>VSPACE X X Attribute VSPACE <BR>WIDTH X X Attribute WIDTH <BR>MAYSCRIPT X X Param MAYSCRIPT <BR> <BR> Some attributes are special to the OBJECT tag. These <BR>attributes are: <BR> <BR> Meaning in OBJECT tag <BR>Attribute CLSID It should always have the same value. <BR>i.e. "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93". <BR>Attribute CODEBASE It should be a full URL pointing to a <BR>CAB file somewhere on the network. It should, by default, <BR>point to a page on the Java Software web site. <BR>Param type If it is a Java applet, the value should be <BR>"application/x-java-applet;version=1.2" or "application/x-java-applet". <BR>If it is a JavaBeans component, the value should be <BR>"application/x-java-bean;version=1.2" or "application/x-java-bean". <BR>Param codebase Specifies the base URL of the applet. Relative URL <BR>to the document should be used. This attribute is optional. <BR>Param code Specifies the name of the Java applet or JavaBeans component. <BR>It cannot be used with param object inside the same OBJECT tag. <BR>Param object Specifies the name of the serialized Java applet or <BR>JavaBeans component. It cannot be used with param code inside the <BR>same OBJECT tag. This attribute is optional. Param archive Specifies <BR>the name of the Java archive. This attribute is optional. <BR>Param mayscript Specifies whether the applet is allowed to access <BR>netscape.javascript.JSObject. The value can be either "true" or <BR>"false". This attribute is optional. <BR> <BR> Note that if the original APPLET tag has PARAM type, codebase, <BR> code, object or archive, mapping it to the OBJECT tag will <BR> cause a problem because duplicate param names will occur. <BR> To avoid this, Java Plug-in also supports another set of param <BR> names, as follows: <BR>Original Param Names New Param Names <BR>code java_code <BR>codebase java_codebase <BR>archive java_archive <BR>object java_object <BR>type java_type <BR>You should use these new param names only when necessary. <BR>If both the new and original param names exist in the same <BR>OBJECT tag, the value associated with the new param name <BR>is always used by Java Plug-in to load the applet or JavaBean. <BR>Java Plug-in in Netscape Navigator on Windows 95, Windows <BR>98, Windows NT 4.0, or SolarisTM operating environments <BR>To use Java Plug-in in Netscape Navigator 3 or 4 on <BR>Windows 95, Windows 98, Windows NT 4.0, or Solaris operating <BR>environments, use the EMBED tag. The following example maps <BR>an APPLET tag to a Java Plug-in EMBED tag: <BR>Original APPLET tag: <BR> <BR><APPLET code="XYZApp.class" codebase="html/" align="baseline" <BR> width="200" height="200"> <BR><PARAM NAME="model" VALUE="models/HyaluronicAcid.xyz"> <BR> No JDK 1.2 support for APPLET!! <BR></APPLET> <BR> <BR> New EMBED tag: <BR> <BR><EMBED type="application/x-java-applet;version=1.2" width="200" <BR> height="200" align="baseline" code="XYZApp.class" <BR> codebase="html/" model="models/HyaluronicAcid.xyz" <BR> pluginspage="<A HREF="http://java.sun.com/products/plugin/1.2/plugin-install.html">">http://java.sun.com/products/plugin/1.2/plugin-install.html"></A> <BR><NOEMBED> <BR> No JDK 1.2 support for APPLET!! <BR></NOEMBED> <BR></EMBED> <BR> <BR> <BR> Note that the EMBED tag contains similar information to the APPLET <BR>tag, and it is sufficient to launch Java Plug-in in Navigator. The <BR>attribute type in the EMBED tag is used for identifying the type of <BR>the Java programming language executable, such as an applet or a <BR>bean. When Navigator renders this attribute in the EMBED tag, it <BR>will try to load Java Plug-in into the browser. By specifying the <BR>type attribute, Java Plug-in will know how to initialize the Java <BR>programming language executable. <BR>In the above example, several attributes in the EMBED tag, such <BR>as width, height and align, map directly from the corresponding <BR>attributes in the APPLET tag. These contain formatting information <BR>that Navigator uses to position Java Plug-in. Since this information <BR>is mapped directly without changes, the position and appearance of <BR>the applets using Java Plug-in should be the same as those applets <BR>using the APPLET tag. <BR>Unlike the OBJECT tag, all information must be stored inside the <BR><EMBED> tag instead of using PARAM. Therefore, all attributes and <BR>params in the APPLET tag must be mapped as attribute-value pairs <BR>inside the EMBED tag. <BR>In the above example, the code and codebase attributes in the <BR>APPLET tag are mapped into the EMBED tag attributes. Attribute <BR>code identifies the applet. Its value should be the same as the <BR>code attribute in the APPLET tag. Attribute codebase identifies <BR>the codebase of the applet. Java Plug-in knows where to download <BR>the applet or JavaBeans component because it can read this <BR>information from the attributes. Also notice that the model <BR>attribute within the EMBED tag is mapped from the model param <BR>inside the APPLET tag. <BR>Like the codebase attribute in the OBJECT tag, attribute <BR>pluginspage in the EMBED tag is used by Navigator if Java <BR>Plug-in is not installed. It should always point to the Java <BR>Plug-in Download Page on the Java Software web site. <BR>The text "No JDK 1.2 support for APPLET!!" in the APPLET tag <BR>is mapped inside the <NOEMBED> and </NOEMBED> tags. Originally, <BR>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?