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 class="loginBut">登录</button>
</body>
<script>
// 事件
// 三要素: 事件源 事件处理类型 事件处理函数
// 三种
// 1
// 2
document.querySelector(".loginBut").onclick = function (event) {
console.log(event);
}
// document.querySelector(".loginBut").onclick = function () {
// alert("用户登录2")
// }
// document.querySelector(".loginBut").onclick = null
// document.querySelector(".loginBut").addEventListener("click", function() {
// alert("用户登录1")
// })
// document.querySelector(".loginBut").addEventListener("click", function() {
// alert("用户登录2")
// })
</script>
</html>