This article describes the method of calling js and applets. Share it for your reference, as follows:
js call java
Can be used on the web page
<script language=javascript> method name in document.applets[0].java</script>
You can control the applet or return the value from the applet.
The return value does not need to be concerned with the value type, and js will convert implicitly.
Type matching should be considered when passing values into applets.
java calls js
Need to import the class netscape.javascript.jsobject
for example:
jsobject window=jsobject.getwindow(this);jsobject window=(jsobject)window.getmember("document");to obtain control over the current window.
For more information about JavaScript related content, please check out the topics of this site: "Summary of JavaScript switching effects and techniques", "Summary of JavaScript search algorithm skills", "Summary of JavaScript animation effects and techniques", "Summary of JavaScript errors and debugging techniques", "Summary of JavaScript data structures and algorithm skills", "Summary of JavaScript traversal algorithms and techniques", and "Summary of JavaScript mathematical operations usage"
I hope this article will be helpful to everyone's JavaScript programming.