HTML——理解Javascript事件
<!DOCTYPE html> <html lang = "en"> <head> <title>Event Test</title> </head> <body> <h1>Event Test</h1> <button type = "button" onclick = "alert('You clicked the button.')"> Click Me!</button> </body> </html>
<!DOCTYPE html> <html lang = "en"> <head> <title>Event Test</title> </head> <body> <h1>Event Test</h1> <button type = "button" onclick = "alert('You clicked the button.')"> Click Me!</button> </body> </html>