<!DOCTYPE html> <html> <body> <h1>JavaScript 事件</h1> <button onclick="this.innerHTML=Date()">时间是?</button> </body> </html>