applet
<applet>
已废弃
此功能已过时。虽然它可能在某些浏览器中仍然有效,但由于可以在任何时候删除它,所以不鼓励使用它。尽量避免使用它。
HTML中的Applet元素(<applet>) 标志着包含了Java的applet。
属性(Attributes)
align
该属性被用来定义网页上applet相对于周围内容的对齐方式。HTML4.01规范定义了bottom, left, middle, right和 top的值,而Microsoft(微软)和Netscaple(网景)也可能支持absbottom
, absmiddle
, baseline
, center
和texttop。
示例
<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>
浏览器兼容性
Feature | Chrome | Edge | Firefox | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic Support | No | No | No1 | (Yes) | No | No |
Feature | Android | Chrome for Android | Edge mobile | Firefox for Android | IE mobile | Opera Android | iOS Safari |
---|---|---|---|---|---|---|---|
Basic Support | No | No | No | No1 | (Yes) | No | No |
Notes
The W3C specification does not encourage the use of <applet> and prefers the use of the <object> tag. Under the strict definition of HTML 4.01, this element is deprecated and entirely obsolete in HTML5.