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,46 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>事件</title>
</head>
<body>
<p class="ddddd" onclick="demos()"> 点我触发事件 </p>
<button class="btn1">我是按钮</button>
<button class="btn2">我是按钮2</button>
<script>
// 用户进行某项操作
// 浏览器有两"棵树"bom(window)dom(document)
// 通过js操作浏览器(刷新,打开窗口)bom
// 通过js操作页面上的html(显示隐藏元素,修改元素颜色)dom
function demos () {
alert("事件被触发")
document.querySelector(".ddddd").innerText = "哈哈哈哈"
document.title = "的回调古尔丹股权"
open("https://www.runoob.com/js/js-events.html")
}
document.querySelector(".btn1").onclick = function () {
alert(1)
}
// document.querySelector(".btn2").addEventListener("click", function() {
// alert(22222)
// })
</script>
</body>
</html>