本帖最後由 陳育霖 於 2023-9-1 16:23 編輯
在HTML中輸出內容- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- </head>
- <body>
- <p id="output100"></p>
- <script>
- document.getElementById("output100").innerHTML = 100;
- </script>
- </body>
- </html>
複製代碼- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- </head>
- <body>
- <p>OK點OK</p>
- <button type="button" onclick="document.write('OK')">OK</button>
- </body>
- </html>
複製代碼 |