I have problem with calling a java function from javascript. Although it works for other browsers like IE, Firefox and chrome, it doesn't in safari.
Here is my code.
<HTML>
<HEAD>
<TITLE>Simple Applet Example</TITLE>
<SCRIPT>
function callSpin()
{
document.getElementById("myslotmachine").spin();
}
</SCRIPT>
</HEAD>
<BODY>
<applet hspace="0" height="240" width="510" vspace="0" border="0" code="testSlot" id="myslotmachine"> </applet>
<form name="myForm" method="post" action="">
<input type="button" name="Button" value="Button" onClick="callSpin()">
</form>
</BODY>
</HTML>
Does anybody know why safari has this problem and how to solve it out?
Thanks in advance.
Mona
尝试将mayscript
属性添加到<applet>
标记:
<applet ... mayscript> </applet>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.