首页 > 编程 > JavaScript > 正文

JavaScript如何与Applet通讯

2019-11-18 11:58:08
字体:
来源:转载
供稿:网友


  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:



发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表