Button onClick to output Applet - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input Button


Button onClick to output Applet

Demo Code

ResultView the demo in separate window

      <title> Welcome on board! </title> 
      <script type="text/javascript">
        function loadApplet()/*from w  w w.  j  a v a  2 s .c o m*/
        console.log("Load Applet");
        document.write("<applet code='MyApplet' height='300' width='300'></applet>");
      <p>Click here for new Applet session!</p> 
      <button onclick="loadApplet();">Click here</button>  

Related Tutorials