⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 appletexample2.htm

📁 这是javascript高级程序设计的源码
💻 HTM
字号:
<html>
    <head>
	      <title>Applet Example</title>
        <script>
            
            function changeAppletMessage() {   
                var oApplet = document.getElementById("ExampleApplet");
                var oTextbox = document.getElementById("txtMessage");
                
                try {
                    oApplet.setMessage(oTextbox.value); 
                } catch (oError) {
                    alert("Error caught: " + oError);
                }                                  
            }
        </script>
    </head>
    <body>
        <p>Enter the message you want to see in the applet. If you leave the textbox
        blank and click Set Message, it will cause an error.</p>
        <p><input type="text" id="txtMessage" size="10" />
        <input type="button" value="Set Message" onclick="changeAppletMessage()" />
        </p>
                
        <object type="application/x-java-applet" code="ExampleApplet2.class"
                width="100" height="100" border="1" id="ExampleApplet">
            <comment>
                <applet code="ExampleApplet2.class" width="100" height="100" 
                        name="ExampleApplet"></applet>
            </comment>            
        </object>
    </body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -