Invoking Javascript Code From An Applet

java packages » java.applet
Java Example Program / Sample Source Code
Html Code
<html>
    <script>
    function alertMessage(message) {
       alert(message);
       alert(document.applets[0]);
    }
    </script>
    <body>
        <form>
            <input type="button" value="call Java Applet method" onClick="document.JavascriptToApplet.setMessageText()">
        </form>
        <applet code="JavascriptToApplet" name="JavascriptToApplet" height="300" width="350" mayscript></applet>
    </body>
</html>

Applet


AppletContext

2011-2021 JavaExamples.org Privacy Policy Powered by Google App Engine