Public methods and member variables of Java applets are visible to HTML documents. This makes the methods and variables can be accessed using JavaScript. The syntax for doing this is given below:
var javascript_var = document.appletname.applet_var
The value of variable