study/html/如何响应鼠标点击事件.html
2022-08-04 12:30:02 +08:00

24 lines
684 B
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="" />
<title>如何响应鼠标点击事件</title>
</head>
<body>
<h1>如何响应鼠标点击事件</h1>
<h2>作者:赵海洋</h2>
<div>
<button onclick="counter.innerText = Number(counter.innerText) - 1">
</button>
<var id="counter" title="counter">0</var>
<button onclick="counter.innerText = Number(counter.innerText) + 1">
</button>
</div>
</body>
</html>