写一个页面如下:
<html>
<body onload="window.close()">
</body>
<html>
保存在服务器上名为close_window.html
然后在applet按钮的点击事件中加如下代码:
try {
URL url = new URL(getDocumentBase(), "close_window.html");
this.getAppletContext().showDocument(url);
}catch(MalformedURLException e) {
}
<html>
<body onload="window.close()">
</body>
<html>
保存在服务器上名为close_window.html
然后在applet按钮的点击事件中加如下代码:
try {
URL url = new URL(getDocumentBase(), "close_window.html");
this.getAppletContext().showDocument(url);
}catch(MalformedURLException e) {
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货