fmpq.com
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> </head> <body> <p>点击按钮执行 <em>displayDate()</em> 函数。</p> <button onclick="displayDate()">点我</button> <script> function displayDate() { document.getElementById("demo").innerHTML=Date(); } </script> <p id="demo"></p> </body> </html>
运行结果