WEB开发网
开发学院WEB开发Jsp JavaScript如何与Applet通讯 阅读

JavaScript如何与Applet通讯

 2008-01-05 17:58:49 来源:WEB开发网   
核心提示:Your Name: Applet1.java import java.applet.Applet; import java.awt.*; public class Applet1 extends Applet { /** * @para


  Your Name:

Applet1.java

import java.applet.Applet;

import java.awt.*;

public class Applet1 extends Applet {

/**

* @param args the command line arguments

*/

public String UserName="Jdeveloper";

public void paint(Graphics g) {

g.drawString("Hello:"+UserName,20,20);

}

public void setUserName(String UserName){

this.UserName = UserName;

}

public String getUserName(){

return UserName;

}

}

把下列代码加入…中:

把下列Html代码加入…中:

Your Name:


Tags:JavaScript 如何 Applet

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接