过时
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
<applet>
element was removed in
Gecko 56
and
Chrome 47
.
Removal is being considered in WebKit and Edge .
过时
HTML 小程序元素
(
<applet>
) embeds a Java applet into the document; this element has been deprecated in favor of
<object>
.
Use of Java applets on the Web is deprecated; most browsers no longer support use of plug-ins, including the Java plug-in.
| 内容类别 | 流内容 , 措词内容 , embedded content , interactive content, palpable content. |
|---|---|
| 准许内容 |
Zero or more
<param>
elements, then
transparent
.
|
| Tag omission | None, both the starting and ending tag are mandatory. |
| Permitted parents | Any element that accepts embedded content . |
| DOM 接口 |
HTMLAppletElement
|
align
bottom
,
left
,
middle
,
right
,和
top
, whereas Microsoft and Netscape also might support
absbottom
,
absmiddle
,
baseline
,
center
,和
texttop
.
alt
<applet>
element may also be rendered as alternative text.
archive
This attribute refers to an archived or compressed version of the applet and its associated class files, which might help reduce download time.
code
codebase
属性。
codebase
This attribute gives the absolute or relative URL of the directory where applets' .class files referenced by the code attribute are stored.
datafld
<param>
elements passed to the Java applet.
datasrc
datafld
, this attribute is used for data binding under Internet Explorer 4. It indicates the id of the data source object that supplies the data that is bound to the
<param>
elements associated with the applet.
height
This attribute specifies the height, in pixels, that the applet needs.
hspace
This attribute specifies additional horizontal space, in pixels, to be reserved on either side of the applet.
mayscript
In the Netscape implementation, this attribute allows access to an applet by programs in a scripting language embedded in the document.
名称
This attribute assigns a name to the applet so that it can be identified by other resources; particularly scripts.
对象
This attribute specifies the URL of a serialized representation of an applet.
src
As defined for Internet Explorer 4 and higher, this attribute specifies a URL for an associated file for the applet. The meaning and use is unclear and not part of the HTML standard.
vspace
This attribute specifies additional vertical space, in pixels, to be reserved above and below the applet.
width
This attribute specifies in pixels the width that the applet needs.
<applet code="game.class" align="left" archive="game.zip" height="250" width="350"> <param name="difficulty" value="easy"> <b>Sorry, you need Java to play this game.</b> </applet>
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
applet
弃用
|
Chrome 不支持 ? — 47 | Edge 不支持 12 — 79 | Firefox 不支持 ? — 56 | IE 完整支持 Yes | Opera 不支持 ? — 34 |
Safari
完整支持
Yes
注意事项
|
WebView Android 不支持 No | Chrome Android 不支持 ? — 47 | Firefox Android 不支持 ? — 56 | Opera Android 不支持 ? — 34 | Safari iOS 不支持 No | Samsung Internet Android 不支持 ? — 5.0 |
align
弃用
|
Chrome 不支持 ? — 47 | Edge 不支持 12 — 79 | Firefox 不支持 ? — 56 | IE 完整支持 Yes | Opera 不支持 ? — 34 | Safari 完整支持 Yes | WebView Android 不支持 No | Chrome Android 不支持 ? — 47 | Firefox Android 不支持 ? — 56 | Opera Android 不支持 ? — 34 | Safari iOS 不支持 No | Samsung Internet Android 不支持 ? — 5.0 |
alt
弃用
|
Chrome 不支持 ? — 47 | Edge 不支持 12 — 79 | Firefox 不支持 ? — 56 | IE 完整支持 Yes | Opera 不支持 ? — 34 | Safari 完整支持 Yes | WebView Android 不支持 No | Chrome Android 不支持 ? — 47 | Firefox Android 不支持 ? — 56 | Opera Android 不支持 ? — 34 | Safari iOS 不支持 No | Samsung Internet Android 不支持 ? — 5.0 |
archive
弃用
|
Chrome 不支持 ? — 47 | Edge 不支持 12 — 79 | Firefox 不支持 ? — 56 | IE 完整支持 Yes | Opera 不支持 ? — 34 | Safari 完整支持 Yes | WebView Android 不支持 No | Chrome Android 不支持 ? — 47 | Firefox Android 不支持 ? — 56 | Opera Android 不支持 ? — 34 | Safari iOS 不支持 No | Samsung Internet Android 不支持 ? — 5.0 |
code
弃用
|
Chrome 不支持 ? — 47 | Edge 不支持 12 — 79 | Firefox 不支持 ? — 56 | IE 完整支持 Yes | Opera 不支持 ? — 34 | Safari 完整支持 Yes | WebView Android 不支持 No | Chrome Android 不支持 ? — 47 | Firefox Android 不支持 ? — 56 | Opera Android 不支持 ? — 34 | Safari iOS 不支持 No | Samsung Internet Android 不支持 ? — 5.0 |
codebase
弃用
|
Chrome 不支持 ? — 47 | Edge 不支持 12 — 79 | Firefox 不支持 ? — 56 | IE 完整支持 Yes | Opera 不支持 ? — 34 | Safari 完整支持 Yes | WebView Android 不支持 No | Chrome Android 不支持 ? — 47 | Firefox Android 不支持 ? — 56 | Opera Android 不支持 ? — 34 | Safari iOS 不支持 No | Samsung Internet Android 不支持 ? — 5.0 |
datafld
弃用
|
Chrome 不支持 ? — 47 | Edge 不支持 12 — 79 | Firefox 不支持 ? — 56 | IE 完整支持 Yes | Opera 不支持 ? — 34 | Safari 完整支持 Yes | WebView Android 不支持 No | Chrome Android 不支持 ? — 47 | Firefox Android 不支持 ? — 56 | Opera Android 不支持 ? — 34 | Safari iOS 不支持 No | Samsung Internet Android 不支持 ? — 5.0 |
datasrc
弃用
|
Chrome 不支持 ? — 47 | Edge 不支持 12 — 79 | Firefox 不支持 ? — 56 | IE 完整支持 Yes | Opera 不支持 ? — 34 | Safari 完整支持 Yes | WebView Android 不支持 No | Chrome Android 不支持 ? — 47 | Firefox Android 不支持 ? — 56 | Opera Android 不支持 ? — 34 | Safari iOS 不支持 No | Samsung Internet Android 不支持 ? — 5.0 |
height
弃用
|
Chrome 不支持 ? — 47 | Edge 不支持 12 — 79 | Firefox 不支持 ? — 56 | IE 完整支持 Yes | Opera 不支持 ? — 34 | Safari 完整支持 Yes | WebView Android 不支持 No | Chrome Android 不支持 ? — 47 | Firefox Android 不支持 ? — 56 | Opera Android 不支持 ? — 34 | Safari iOS 不支持 No | Samsung Internet Android 不支持 ? — 5.0 |
hspace
弃用
|
Chrome 不支持 ? — 47 | Edge 不支持 12 — 79 | Firefox 不支持 ? — 56 | IE 完整支持 Yes | Opera 不支持 ? — 34 | Safari 完整支持 Yes | WebView Android 不支持 No | Chrome Android 不支持 ? — 47 | Firefox Android 不支持 ? — 56 | Opera Android 不支持 ? — 34 | Safari iOS 不支持 No | Samsung Internet Android 不支持 ? — 5.0 |
mayscript
弃用
|
Chrome 不支持 ? — 47 | Edge 不支持 12 — 79 | Firefox 不支持 ? — 56 | IE 完整支持 Yes | Opera 不支持 ? — 34 | Safari 完整支持 Yes | WebView Android 不支持 No | Chrome Android 不支持 ? — 47 | Firefox Android 不支持 ? — 56 | Opera Android 不支持 ? — 34 | Safari iOS 不支持 No | Samsung Internet Android 不支持 ? — 5.0 |
名称
弃用
|
Chrome 不支持 ? — 47 | Edge 不支持 12 — 79 | Firefox 不支持 ? — 56 | IE 完整支持 Yes | Opera 不支持 ? — 34 | Safari 完整支持 Yes | WebView Android 不支持 No | Chrome Android 不支持 ? — 47 | Firefox Android 不支持 ? — 56 | Opera Android 不支持 ? — 34 | Safari iOS 不支持 No | Samsung Internet Android 不支持 ? — 5.0 |
对象
弃用
|
Chrome 不支持 ? — 47 | Edge 不支持 12 — 79 | Firefox 不支持 ? — 56 | IE 完整支持 Yes | Opera 不支持 ? — 34 | Safari 完整支持 Yes | WebView Android 不支持 No | Chrome Android 不支持 ? — 47 | Firefox Android 不支持 ? — 56 | Opera Android 不支持 ? — 34 | Safari iOS 不支持 No | Samsung Internet Android 不支持 ? — 5.0 |
src
弃用
|
Chrome 不支持 ? — 47 | Edge 不支持 12 — 79 | Firefox 不支持 ? — 56 | IE 完整支持 Yes | Opera 不支持 ? — 34 | Safari 完整支持 Yes | WebView Android 不支持 No | Chrome Android 不支持 ? — 47 | Firefox Android 不支持 ? — 56 | Opera Android 不支持 ? — 34 | Safari iOS 不支持 No | Samsung Internet Android 不支持 ? — 5.0 |
vspace
弃用
|
Chrome 不支持 ? — 47 | Edge 不支持 12 — 79 | Firefox 不支持 ? — 56 | IE 完整支持 Yes | Opera 不支持 ? — 34 | Safari 完整支持 Yes | WebView Android 不支持 No | Chrome Android 不支持 ? — 47 | Firefox Android 不支持 ? — 56 | Opera Android 不支持 ? — 34 | Safari iOS 不支持 No | Samsung Internet Android 不支持 ? — 5.0 |
width
弃用
|
Chrome 不支持 ? — 47 | Edge 不支持 12 — 79 | Firefox 不支持 ? — 56 | IE 完整支持 Yes | Opera 不支持 ? — 34 | Safari 完整支持 Yes | WebView Android 不支持 No | Chrome Android 不支持 ? — 47 | Firefox Android 不支持 ? — 56 | Opera Android 不支持 ? — 34 | Safari iOS 不支持 No | Samsung Internet Android 不支持 ? — 5.0 |
完整支持
不支持
弃用。不要用于新网站。
见实现注意事项。
The W3C specification does not encourage the use of
<applet>
and prefers the use of the
<object>
element. Under the strict definition of HTML 4.01, this element is deprecated and entirely obsolete in HTML5.