English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
HTML中的Applet元素( <applet>) 表示包含了Java的applet。这个元素在HTML5中已经废弃,不能再被使用。网页开发者应该使用更通用的元素。
一个嵌入的Java applet:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>基础教程网(w3(codebox.com)</title> </head> <body> <applet code="Bubbles.class" width="350" height="350"> Java applet,它绘制动画气泡。 </applet> </body> </html>
IEFirefoxOperaChromeSafari
注意:某些浏览器中依然存在对<applet>的支持,但是需要额外的插件和安装过程才能起作用。
HTML5 不支持<applet>标签。请使用 <object> 或 <embed> 标签来代替它。
In HTML 4.01 中,<applet>元素已废弃。
<applet>标记定义一个嵌入式的applet。
HTML5 不支持<applet>标签,HTML 4.01 已废弃<applet>标签。
attribute | value | description |
---|---|---|
code | URL | 规定Java applet的文件名。 |
object | name | 规定了包含该applet的一系列版本的资源名称。 |
attribute | value | description |
---|---|---|
对齐 | 左侧 右侧 顶部 底部 中间 基线 | 定义applet相对于周围元素的对齐方式。 |
alt | text | specify the alternative text for the applet. |
archive | URL | specify the location of the archive file. |
codebase | URL | specify the base URL of the applet specified in the code attribute. |
height | pixels | specify the height of the applet. |
hspace | pixels | define the horizontal spacing around the applet. |
name | name | define the name of the applet (used in scripts). |
vspace | pixels | define the vertical spacing around the applet. |
width | pixels | specify the width of the applet. |
In HTML 4.01 in the <applet> tag supports the following standard attributes:
attribute | value | description |
---|---|---|
class | classname | specify the class name of the element |
id | id | specify the unique id of the element |
style | style_definition | define the inline style of the element |
title | text | specify additional information about the element |
For a complete description, please visitStandard Attributes.
In HTML 4.01 where the <applet> tag does not support any event attributes.
For a complete description, please visitEvent Attributes.