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,108 @@
<!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>js function</title>
</head>
<body>
</body>
<script>
// 大学室友帮你洗衣服的所有过程
// function GetName() {
// console.log(`张三收到了你的:${arguments[0]},还有洗衣服需要的钱:${arguments[1]}`);
// return "衣服洗完了,给你吧,收好衣服"
// }
// var result = GetName("脏衣服", 2)
// console.log("result: ", result);
// function js () {
// var res = 0
// for (var i = 0; i < arguments.length; i++) {
// res += arguments[i]
// }
// return res;
// }
// console.log( js(1,2,3,4) );
// var GetName = function (num1) {
// console.log("哈哈哈: ", num1)
// }
// var GetName = num1 => console.log("哈哈哈: ", num1)
// GetName("你好")
// 全局变量
// var a = 2;
// function test() {
// // 局部变量
// a = 1;
// }
// test();
// console.log(a);
// function js() {
// // 这个变量无法实现缓存上次的计算结果,在我们第二次调用的时候
// // 会无法实现累加
// var res = 0;
// function test() {
// for (var i = 0; i < arguments.length; i++) {
// res += arguments[i]
// }
// return res;
// }
// return test;
// }
// var sss = js()
// sss(1, 2)
// console.log( sss(3, 4) );
// console.log( eeee(5, 6) );
// var a = function () {
// console.log("a");
// }
// var c = a;
// function hello(callback) {
// var res = 10;
// setTimeout(() => {
// res = 20;
// callback(res)
// }, 3000)
// return res;
// }
// hello(function (tes) {
// console.log(tes);
// })
// function a(c) {
// c(10)
// }
// a( function(fff) {
// console.log(fff);
// } )
</script>
</html>

View File

@@ -0,0 +1,64 @@
<!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="btn2">点我2</button>
</body>
<script>
// var button = {
// tagName: 'button',
// className: 'btn2',
// idName: '',
// onClick: null,
// addEventListener: [ function(){}, function() {} ]
// innerText: '你好',
// children: [
// {
// tagName: 'span',
// className: '',
// idName: '',
// innerText: '点我2',
// }
// ]
// }
// document dom
// var button = document.querySelector(".btn2")
// button.onclick = function () {
// alert("你好1")
// }
// button.onclick = function () {
// alert("你好2")
// }
// button.onclick = function () {
// alert("你好3")
// }
// button.addEventListener("click", function() {
// alert(1)
// })
// button.addEventListener("click", function() {
// alert(2)
// })
// button.innerText = "哈哈哈哈哈"
// button.className = "btnhaahah"
// function test() {
// alert("你好")
// }
</script>
</html>