[英]Accessing Java Applet non-static methods using Java
I'm trying to access non-static methods in a java applet, through javascript. 我正在尝试通过javascript访问Java小程序中的非静态方法。
I access static methods using the Syntax AppletName.Packages.className.methodName();
我使用语法AppletName.Packages.className.methodName();
访问静态方法AppletName.Packages.className.methodName();
and it works. 而且有效。
If I try to access a non-static member/method via JavaScript, I get an error " Error calling method on NPObject
", but nothing on the Java Console. 如果尝试通过JavaScript访问非静态成员/方法,则会收到错误“ Error calling method on NPObject
上的Error calling method on NPObject
”,但Java控制台上未显示任何Error calling method on NPObject
。
Is there a way to access non-static applet methods from Javascript? 有没有办法从Javascript访问非静态applet方法?
请参阅从Javascript调用Java方法 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.