From 35f6e6b5356ec68645a7712d3a3cf6a1598e808d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A0=E5=BF=97=E6=96=B0?= <1759998065@qq.com> Date: Thu, 20 Oct 2022 03:46:06 +0000 Subject: [PATCH 1/7] =?UTF-8?q?=E6=96=B0=E5=BB=BA=2005=E5=8D=A0=E5=BF=97?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "05\345\215\240\345\277\227\346\226\260/.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "05\345\215\240\345\277\227\346\226\260/.keep" diff --git "a/05\345\215\240\345\277\227\346\226\260/.keep" "b/05\345\215\240\345\277\227\346\226\260/.keep" new file mode 100644 index 0000000..e69de29 -- Gitee From 452352272111dce6b842931de1e99e406f2b35b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A0=E5=BF=97=E6=96=B0?= <1759998065@qq.com> Date: Thu, 20 Oct 2022 03:46:37 +0000 Subject: [PATCH 2/7] =?UTF-8?q?=E6=96=B0=E5=BB=BA=2010-13=20js=E5=9F=BA?= =?UTF-8?q?=E7=A1=80=20=E7=AC=AC=E4=B8=80=E6=AC=A1=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "05\345\215\240\345\277\227\346\226\260/10-13 js\345\237\272\347\241\200 \347\254\254\344\270\200\346\254\241\344\275\234\344\270\232/.keep" diff --git "a/05\345\215\240\345\277\227\346\226\260/10-13 js\345\237\272\347\241\200 \347\254\254\344\270\200\346\254\241\344\275\234\344\270\232/.keep" "b/05\345\215\240\345\277\227\346\226\260/10-13 js\345\237\272\347\241\200 \347\254\254\344\270\200\346\254\241\344\275\234\344\270\232/.keep" new file mode 100644 index 0000000..e69de29 -- Gitee From 06f1f29be60fc97dd79dfa9edbc58e7b40170e4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A0=E5=BF=97=E6=96=B0?= <1759998065@qq.com> Date: Thu, 20 Oct 2022 03:46:54 +0000 Subject: [PATCH 3/7] =?UTF-8?q?05=E5=8D=A0=E5=BF=97=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 占志新 <1759998065@qq.com> --- ...\346\254\241\344\275\234\344\270\232.html" | 97 +++++++++++++++++++ .../js\345\237\272\347\241\200.txt" | 54 +++++++++++ 2 files changed, 151 insertions(+) create mode 100644 "05\345\215\240\345\277\227\346\226\260/10-13 js\345\237\272\347\241\200 \347\254\254\344\270\200\346\254\241\344\275\234\344\270\232/10-13 js\345\237\272\347\241\200 \347\254\254\344\270\200\346\254\241\344\275\234\344\270\232.html" create mode 100644 "05\345\215\240\345\277\227\346\226\260/10-13 js\345\237\272\347\241\200 \347\254\254\344\270\200\346\254\241\344\275\234\344\270\232/js\345\237\272\347\241\200.txt" diff --git "a/05\345\215\240\345\277\227\346\226\260/10-13 js\345\237\272\347\241\200 \347\254\254\344\270\200\346\254\241\344\275\234\344\270\232/10-13 js\345\237\272\347\241\200 \347\254\254\344\270\200\346\254\241\344\275\234\344\270\232.html" "b/05\345\215\240\345\277\227\346\226\260/10-13 js\345\237\272\347\241\200 \347\254\254\344\270\200\346\254\241\344\275\234\344\270\232/10-13 js\345\237\272\347\241\200 \347\254\254\344\270\200\346\254\241\344\275\234\344\270\232.html" new file mode 100644 index 0000000..27bc648 --- /dev/null +++ "b/05\345\215\240\345\277\227\346\226\260/10-13 js\345\237\272\347\241\200 \347\254\254\344\270\200\346\254\241\344\275\234\344\270\232/10-13 js\345\237\272\347\241\200 \347\254\254\344\270\200\346\254\241\344\275\234\344\270\232.html" @@ -0,0 +1,97 @@ +** +2. 1-100之间偶数相加,能被7整除的数字不参加累加运算,求和 +3. 求1999-2022的润年 +4. 输入分数,如果分数在 90-100: A 80-89:B 60-79:C 小于60:D + 考虑分数不合法 + + + + + + + + + + + \ No newline at end of file diff --git "a/05\345\215\240\345\277\227\346\226\260/10-13 js\345\237\272\347\241\200 \347\254\254\344\270\200\346\254\241\344\275\234\344\270\232/js\345\237\272\347\241\200.txt" "b/05\345\215\240\345\277\227\346\226\260/10-13 js\345\237\272\347\241\200 \347\254\254\344\270\200\346\254\241\344\275\234\344\270\232/js\345\237\272\347\241\200.txt" new file mode 100644 index 0000000..c91ffca --- /dev/null +++ "b/05\345\215\240\345\277\227\346\226\260/10-13 js\345\237\272\347\241\200 \347\254\254\344\270\200\346\254\241\344\275\234\344\270\232/js\345\237\272\347\241\200.txt" @@ -0,0 +1,54 @@ +HTML 中的 Javascript 脚本代码必须位于 标签之间。 + +Javascript 脚本代码可被放置在 HTML 页面的 和 部分中。 + + 会告诉 JavaScript 在何处开始和结束。 + + 之间的代码行包含了 JavaScript: + + + +浏览器支持调试,你可以使用 console.log() 方法在浏览器中显示 JavaScript 值。 + + +avaScript 使用关键字 var 来定义变量, 使用等号来为变量赋值: + +var x, length + +x = 5 + +length = 6 + + + + +var length = 16; // Number 通过数字字面量赋值 +var points = x * 10; // Number 通过表达式字面量赋值 +var lastName = "Johnson"; // String 通过字符串字面量赋值 +var cars = ["Saab", "Volvo", "BMW"]; // Array 通过数组字面量赋值 +var person = {firstName:"John", lastName:"Doe"}; // Object 通过对象字面量赋值 + + + + + +break 用于跳出循环。 +catch 语句块,在 try 语句块执行出错时执行 catch 语句块。 +continue 跳过循环中的一个迭代。 +do ... while 执行一个语句块,在条件语句为 true 时继续执行该语句块。 +for 在条件语句为 true 时,可以将代码块执行指定的次数。 +for ... in 用于遍历数组或者对象的属性(对数组或者对象的属性进行循环操作)。 +function 定义一个函数 +if ... else 用于基于不同的条件来执行不同的动作。 +return 退出函数 +switch 用于基于不同的条件来执行不同的动作。 +throw 抛出(生成)错误 。 +try 实现错误处理,与 catch 一同使用。 +var 声明一个变量。 +while 当条件语句为 true 时,执行语句块。 + + +单行注释以 // 开头。 多行注释以 /* 开始,以 */ 结尾。 \ No newline at end of file -- Gitee From 9b5ed545b5ac0eccbc2e51083a5dc0ab30bdbfcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A0=E5=BF=97=E6=96=B0?= <1759998065@qq.com> Date: Thu, 20 Oct 2022 03:47:09 +0000 Subject: [PATCH 4/7] =?UTF-8?q?=E6=96=B0=E5=BB=BA=2010-14=20js=E5=B8=B8?= =?UTF-8?q?=E7=94=A8=E7=B1=BB=20=E7=AC=AC=E4=BA=8C=E6=AC=A1=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "05\345\215\240\345\277\227\346\226\260/10-14 js\345\270\270\347\224\250\347\261\273 \347\254\254\344\272\214\346\254\241\344\275\234\344\270\232/.keep" diff --git "a/05\345\215\240\345\277\227\346\226\260/10-14 js\345\270\270\347\224\250\347\261\273 \347\254\254\344\272\214\346\254\241\344\275\234\344\270\232/.keep" "b/05\345\215\240\345\277\227\346\226\260/10-14 js\345\270\270\347\224\250\347\261\273 \347\254\254\344\272\214\346\254\241\344\275\234\344\270\232/.keep" new file mode 100644 index 0000000..e69de29 -- Gitee From 9528f92de7a51ed06fcb34c319f22beefe2fd094 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A0=E5=BF=97=E6=96=B0?= <1759998065@qq.com> Date: Thu, 20 Oct 2022 03:47:24 +0000 Subject: [PATCH 5/7] =?UTF-8?q?05=E5=8D=A0=E5=BF=97=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 占志新 <1759998065@qq.com> --- ...\346\254\241\344\275\234\344\270\232.html" | 81 +++++++++++++++++++ ...s\345\270\270\347\224\250\347\261\273.txt" | 30 +++++++ 2 files changed, 111 insertions(+) create mode 100644 "05\345\215\240\345\277\227\346\226\260/10-14 js\345\270\270\347\224\250\347\261\273 \347\254\254\344\272\214\346\254\241\344\275\234\344\270\232/10-14 js\345\270\270\347\224\250\347\261\273 \347\254\254\344\272\214\346\254\241\344\275\234\344\270\232.html" create mode 100644 "05\345\215\240\345\277\227\346\226\260/10-14 js\345\270\270\347\224\250\347\261\273 \347\254\254\344\272\214\346\254\241\344\275\234\344\270\232/js\345\270\270\347\224\250\347\261\273.txt" diff --git "a/05\345\215\240\345\277\227\346\226\260/10-14 js\345\270\270\347\224\250\347\261\273 \347\254\254\344\272\214\346\254\241\344\275\234\344\270\232/10-14 js\345\270\270\347\224\250\347\261\273 \347\254\254\344\272\214\346\254\241\344\275\234\344\270\232.html" "b/05\345\215\240\345\277\227\346\226\260/10-14 js\345\270\270\347\224\250\347\261\273 \347\254\254\344\272\214\346\254\241\344\275\234\344\270\232/10-14 js\345\270\270\347\224\250\347\261\273 \347\254\254\344\272\214\346\254\241\344\275\234\344\270\232.html" new file mode 100644 index 0000000..a221b25 --- /dev/null +++ "b/05\345\215\240\345\277\227\346\226\260/10-14 js\345\270\270\347\224\250\347\261\273 \347\254\254\344\272\214\346\254\241\344\275\234\344\270\232/10-14 js\345\270\270\347\224\250\347\261\273 \347\254\254\344\272\214\346\254\241\344\275\234\344\270\232.html" @@ -0,0 +1,81 @@ + + + + + + + + + + + + \ No newline at end of file diff --git "a/05\345\215\240\345\277\227\346\226\260/10-14 js\345\270\270\347\224\250\347\261\273 \347\254\254\344\272\214\346\254\241\344\275\234\344\270\232/js\345\270\270\347\224\250\347\261\273.txt" "b/05\345\215\240\345\277\227\346\226\260/10-14 js\345\270\270\347\224\250\347\261\273 \347\254\254\344\272\214\346\254\241\344\275\234\344\270\232/js\345\270\270\347\224\250\347\261\273.txt" new file mode 100644 index 0000000..7b98970 --- /dev/null +++ "b/05\345\215\240\345\277\227\346\226\260/10-14 js\345\270\270\347\224\250\347\261\273 \347\254\254\344\272\214\346\254\241\344\275\234\344\270\232/js\345\270\270\347\224\250\347\261\273.txt" @@ -0,0 +1,30 @@ +基本数据类型 + + Number - Integer,float + + Boolean Null Undefined Symbol String + +\n:换行 +\t:Tab键 +\\:斜杠 +\':单引号 +\":双引号 + +字符号下标 +第一个元素: string[0] 最后一个元素: string[string.length-1] + + +concat:将两个数组合并在一起 +indexof:查找数组的元素,返回-1表示不存在,与之相同的查找方法还有includes,lastindexof +toString():将数组转成字符串 +slice():表示切片,参数个数:0 1 2 返回一个数组对象 +splice(): 接收 0 2 多 个参数 表示移除,替换元素 + +Math: 舍入 ceil(向上取整) floor(向下取整) round(四舍五入) +//& 同1为1,有0为0 |:有1为1, 同0为0 + + var str = `JavaScript`; + + const arr = str.split('S') //将字符串以()分割,返回是数组 + console.log(arr); + // console.log(String.prototype); \ No newline at end of file -- Gitee From ec30625b5350e8db626e61377a7871f2d87bf271 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A0=E5=BF=97=E6=96=B0?= <1759998065@qq.com> Date: Thu, 20 Oct 2022 03:47:40 +0000 Subject: [PATCH 6/7] =?UTF-8?q?=E6=96=B0=E5=BB=BA=2010-17=20=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E4=B8=B2=E5=B8=B8=E7=94=A8=E7=B1=BB=E4=B8=8E=E6=95=B0?= =?UTF-8?q?=E7=BB=84=20=E7=AC=AC=E4=B8=89=E6=AC=A1=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "05\345\215\240\345\277\227\346\226\260/10-17 \345\255\227\347\254\246\344\270\262\345\270\270\347\224\250\347\261\273\344\270\216\346\225\260\347\273\204 \347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/.keep" diff --git "a/05\345\215\240\345\277\227\346\226\260/10-17 \345\255\227\347\254\246\344\270\262\345\270\270\347\224\250\347\261\273\344\270\216\346\225\260\347\273\204 \347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/.keep" "b/05\345\215\240\345\277\227\346\226\260/10-17 \345\255\227\347\254\246\344\270\262\345\270\270\347\224\250\347\261\273\344\270\216\346\225\260\347\273\204 \347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/.keep" new file mode 100644 index 0000000..e69de29 -- Gitee From 6252a5ced7ab019025b7d7d24a20425bcc621afa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A0=E5=BF=97=E6=96=B0?= <1759998065@qq.com> Date: Thu, 20 Oct 2022 03:47:54 +0000 Subject: [PATCH 7/7] =?UTF-8?q?05=E5=8D=A0=E5=BF=97=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 占志新 <1759998065@qq.com> --- ...\346\254\241\344\275\234\344\270\232.html" | 85 +++++++++++++++++ ...3\345\222\214\346\225\260\347\273\204.txt" | 92 +++++++++++++++++++ 2 files changed, 177 insertions(+) create mode 100644 "05\345\215\240\345\277\227\346\226\260/10-17 \345\255\227\347\254\246\344\270\262\345\270\270\347\224\250\347\261\273\344\270\216\346\225\260\347\273\204 \347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/10-17 \345\255\227\347\254\246\344\270\262\345\270\270\347\224\250\347\261\273\344\270\216\346\225\260\347\273\204 \347\254\254\344\270\211\346\254\241\344\275\234\344\270\232.html" create mode 100644 "05\345\215\240\345\277\227\346\226\260/10-17 \345\255\227\347\254\246\344\270\262\345\270\270\347\224\250\347\261\273\344\270\216\346\225\260\347\273\204 \347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\255\227\347\254\246\344\270\262\345\270\270\347\224\250\347\261\273\345\222\214\346\225\260\347\273\204.txt" diff --git "a/05\345\215\240\345\277\227\346\226\260/10-17 \345\255\227\347\254\246\344\270\262\345\270\270\347\224\250\347\261\273\344\270\216\346\225\260\347\273\204 \347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/10-17 \345\255\227\347\254\246\344\270\262\345\270\270\347\224\250\347\261\273\344\270\216\346\225\260\347\273\204 \347\254\254\344\270\211\346\254\241\344\275\234\344\270\232.html" "b/05\345\215\240\345\277\227\346\226\260/10-17 \345\255\227\347\254\246\344\270\262\345\270\270\347\224\250\347\261\273\344\270\216\346\225\260\347\273\204 \347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/10-17 \345\255\227\347\254\246\344\270\262\345\270\270\347\224\250\347\261\273\344\270\216\346\225\260\347\273\204 \347\254\254\344\270\211\346\254\241\344\275\234\344\270\232.html" new file mode 100644 index 0000000..1c416df --- /dev/null +++ "b/05\345\215\240\345\277\227\346\226\260/10-17 \345\255\227\347\254\246\344\270\262\345\270\270\347\224\250\347\261\273\344\270\216\346\225\260\347\273\204 \347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/10-17 \345\255\227\347\254\246\344\270\262\345\270\270\347\224\250\347\261\273\344\270\216\346\225\260\347\273\204 \347\254\254\344\270\211\346\254\241\344\275\234\344\270\232.html" @@ -0,0 +1,85 @@ + + + + + + + work + + + + + \ No newline at end of file diff --git "a/05\345\215\240\345\277\227\346\226\260/10-17 \345\255\227\347\254\246\344\270\262\345\270\270\347\224\250\347\261\273\344\270\216\346\225\260\347\273\204 \347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\255\227\347\254\246\344\270\262\345\270\270\347\224\250\347\261\273\345\222\214\346\225\260\347\273\204.txt" "b/05\345\215\240\345\277\227\346\226\260/10-17 \345\255\227\347\254\246\344\270\262\345\270\270\347\224\250\347\261\273\344\270\216\346\225\260\347\273\204 \347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\255\227\347\254\246\344\270\262\345\270\270\347\224\250\347\261\273\345\222\214\346\225\260\347\273\204.txt" new file mode 100644 index 0000000..1ff8df7 --- /dev/null +++ "b/05\345\215\240\345\277\227\346\226\260/10-17 \345\255\227\347\254\246\344\270\262\345\270\270\347\224\250\347\261\273\344\270\216\346\225\260\347\273\204 \347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\255\227\347\254\246\344\270\262\345\270\270\347\224\250\347\261\273\345\222\214\346\225\260\347\273\204.txt" @@ -0,0 +1,92 @@ +什么是数组? +数组对象是使用单独的变量名来存储一系列的值。 + +数组可以用一个变量名存储所有的值,并且可以用变量名访问任何一个值。 + +数组中的每个元素都有自己的的ID,以便它可以很容易地被访问到。 + + 创建一个数组,有三种方法。 + +下面的代码定义了一个名为 myCars的数组对象: + +1: 常规方式: + +var myCars=new Array(); +myCars[0]="Saab"; +myCars[1]="Volvo"; +myCars[2]="BMW"; +2: 简洁方式: + +var myCars=new Array("Saab","Volvo","BMW"); +3: 字面: + +var myCars=["Saab","Volvo","BMW"]; + + 在一个数组中你可以有不同的对象 +你可以在一个数组中包含对象元素、函数、数组 + + 增: + arr[10] = 'java' + + 查 : arr[index] + + 改 + arr[1] = "五" + + 删: + delete arr[0]; + + 增加: push, pop , shift, unshift 链表 队列 + arr.pop() //删除最后一个元素 + arr.push(4,5,6) //在数组末尾添加元素 + arr.shift() //删除第一个元素 + arr.unshift(4,5,6) //往数组头部添加元素 + + + + 排序:sort():根据字符串顺序排序,不是按照数字大小排序 + 冒泡排序 + + + console.log('排序前:'+arr); + arr.sort() + arr1.sort() + + + reverse()反转数组 + const arr = [1, '5', null, undefined, 6, 4, 11111111] + arr.reverse() + + console.log(arr1); + + + splice():嫁接(裁掉不需要,需要的接上去) + delete count + + splice(index,delecount,insertvalue):下标index开始,删除delecount个元素 + 再添加inservalue + 只删除, 替换, 添加 + arr.splice(3,0,'嫁','接',666); 替换作用 + + 数组解构 + const arr = [1,2,3,4]; + var a = arr[0]; + var b = arr[1]; + var d = arr[3]; + var[a,...args] = arr; + console.log(a); + console.log(args); + console.log(b); + console.log(c); + console.log(d); + +const arr = [45,74,23,85,23,54,85]; + 通过冒泡排序, 从小到大 从大到小 + for(let i = 0; iarr[j+1]){ + 这部分用了数组解构 + [arr[j],arr[j+1]] = [arr[j+1],arr[j]] + } + } + } \ No newline at end of file -- Gitee