<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>ICCARD.html</title>
</head>
<body>
<applet id="applet" code="ICCard.class" width="500" height="500"/>
</body>
<script>
var applet = document.getElementById("applet");
var str=applet.hello();
alert("获取uid="+str+":");
</script>
</html>
上面是个错误的写法
APPLET可以正常加载,但是无法调用applet.
原因是<applet>是个双标签 必须写成<applet></applet>
原文地址:http://www.cnblogs.com/jsnhj/p/3850685.html