first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
<!DOCTYPE html>
<html lang="en">
<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">
<title>事件</title>
</head>
<body>
<!-- <button onclick="test()">点我1</button> -->
<button class="two">点我2</button>
<!-- <button class="three">点我3</button> -->
</body>
<script>
// 1
// function test() {
// alert("hahha")
// }
// 2
// document.querySelector(".two") 返回的是一个js对象
// 虚拟 dom
document.querySelector(".two").onclick = function (event) {
console.log(event);
alert("哈哈哈1")
}
// // 3
// document.querySelector(".three").addEventListener('click', function () {
// alert("1")
// })
</script>
</html>