看了网上很多javascript调用applet的例子,然是为什么我总是实验不成功,我的目录是这样的
我的为题是
1.我该把java程序放在哪里? class文件放在哪里?
2.javscript中是这样的额
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script type="text/javascript" language="javascript" charset="gb2312">
function Http()
{
//document.WindowAuth.login("1","2");
//var app=new WindowAuth();
//app.login("tomcat","tomcat");
document.WindowAuth.what();
alert("111");
}
</script>
</head>
<body onload="accessApplet()">
<applet id="WA" name="WindowAuth" code="WindowAuth.class" codebase="WEB-INF/lib" archive="WindowAuth.jar,commons-codec-1.6.jar,commons-logging-1.1.1.jar,fluent-hc-4.2.2.jar,httpclient-4.2.2.jar,httpclient-cache-4.2.2.jar,httpcore-4.2.2.jar,httpmime-4.2.2.jar" width="0" height="0" >
</applet>
.........
</body>
应该是没错的,但是调用applet方法始终不成功
java文件时
public class WindowAuth extends Applet{
......
public String what(){
JOptionPane.showMessage(null,"111");
return "122";
}
}
急啊