when invoking java applet method throw javaScript code not working
import java.applet.Applet; import java.awt.Graphics;
public class First extends Applet {
public void paint(Graphics g) {
g.drawString("welcome Esraa", 100, 100);
}
}
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<title>TODO supply a title</title>
<script>
function hello() {
console.log(document.appId.paint());
}
</script>
</head>
<body>
<object type="application/x-java-applet" width="0" height="0" name="appId">
<param name="code" value="First.class" />
</object>
<input type="button" value="getip" onclick="hello()"/>
</body>
</html>