onclick() triggers an event when the mouse is clicked
onmouseover() triggers an event when the mouse enters the area
onmouseout() triggers an event when the mouse leaves the area
<html>
<head>
<title> Mine </title>
</head>
<body>
<!--图片的读入以及跟随鼠标状态变化更改图片-->
<img src = "wood.jpg" alt="tick" onmouseover="this.src='haha.jpg'" onmouseout="this.src='wood.jpg'"/>
<!--点击按钮时弹出消息-->
<input type="button" onclick="alert('You clicked the button!')" value="Click me"/>
</body>
</html>