applet

<applet>

已废弃

此功能已过时。虽然它可能在某些浏览器中仍然有效,但由于可以在任何时候删除它,所以不鼓励使用它。尽量避免使用它。

HTML中的Applet元素(<applet>) 标志着包含了Java的applet。

属性(Attributes)

align该属性被用来定义网页上applet相对于周围内容的对齐方式。HTML4.01规范定义了bottom, left, middle, right和 top的值,而Microsoft(微软)和Netscaple(网景)也可能支持absbottomabsmiddlebaselinecentertexttop。

示例

<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>

浏览器兼容性

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic SupportNoNoNo1(Yes)NoNo

FeatureAndroidChrome for AndroidEdge mobileFirefox for AndroidIE mobileOpera AndroidiOS Safari
Basic SupportNoNoNoNo1(Yes)NoNo

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.