各位大兄,有最简单的java的.class应用于网页的例子么,比如在.htm文件中输入参数param name="strColor" value="FFFFFF",在网页上显示一个类似label的控件,.java的源文件怎么写呀?
// .html
-------------------------------------------------------
<applet code="MyApplet.class"
codebase="./"
archive="MyApplet.jar"
width="600" height="95">
<param name="strColor" value="FFFFFF">
Your browser is completely ignoring the <APPLET> tag!
</applet>
// .java
-------------------------------------------------------
class MyApplet extends Applet {
..
public void init() {
String color = getParameter("strColor");
// color will be set to "FFFFFF"
...
}
...
}