From 9b45ea6c2c115cc4b67d435455ee953b277069b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=86=E5=BB=BA=E9=94=8B?= <467466356@qq.com> Date: Thu, 13 Oct 2022 22:06:02 +0800 Subject: [PATCH 1/2] =?UTF-8?q?2022-10-13=E7=AC=AC=E4=B8=80=E6=AC=A1?= =?UTF-8?q?=E4=BD=9C=E4=B8=9Ajs=E5=9F=BA=E7=A1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...44\270\232js\345\237\272\347\241\200.html" | 62 +++++++++++++++++++ ...\350\256\260js\345\237\272\347\241\200.md" | 59 ++++++++++++++++++ 2 files changed, 121 insertions(+) create mode 100644 "39\351\231\206\345\273\272\351\224\213/2022-10-13\347\254\254\344\270\200\346\254\241\344\275\234\344\270\232js\345\237\272\347\241\200/2022-10-13\347\254\254\344\270\200\346\254\241\344\275\234\344\270\232js\345\237\272\347\241\200.html" create mode 100644 "39\351\231\206\345\273\272\351\224\213/2022-10-13\347\254\254\344\270\200\346\254\241\344\275\234\344\270\232js\345\237\272\347\241\200/2022-10-13\347\254\254\344\270\200\346\254\241\347\254\224\350\256\260js\345\237\272\347\241\200.md" diff --git "a/39\351\231\206\345\273\272\351\224\213/2022-10-13\347\254\254\344\270\200\346\254\241\344\275\234\344\270\232js\345\237\272\347\241\200/2022-10-13\347\254\254\344\270\200\346\254\241\344\275\234\344\270\232js\345\237\272\347\241\200.html" "b/39\351\231\206\345\273\272\351\224\213/2022-10-13\347\254\254\344\270\200\346\254\241\344\275\234\344\270\232js\345\237\272\347\241\200/2022-10-13\347\254\254\344\270\200\346\254\241\344\275\234\344\270\232js\345\237\272\347\241\200.html" new file mode 100644 index 0000000..3a510fe --- /dev/null +++ "b/39\351\231\206\345\273\272\351\224\213/2022-10-13\347\254\254\344\270\200\346\254\241\344\275\234\344\270\232js\345\237\272\347\241\200/2022-10-13\347\254\254\344\270\200\346\254\241\344\275\234\344\270\232js\345\237\272\347\241\200.html" @@ -0,0 +1,62 @@ + + + + + + + Document + + + + + diff --git "a/39\351\231\206\345\273\272\351\224\213/2022-10-13\347\254\254\344\270\200\346\254\241\344\275\234\344\270\232js\345\237\272\347\241\200/2022-10-13\347\254\254\344\270\200\346\254\241\347\254\224\350\256\260js\345\237\272\347\241\200.md" "b/39\351\231\206\345\273\272\351\224\213/2022-10-13\347\254\254\344\270\200\346\254\241\344\275\234\344\270\232js\345\237\272\347\241\200/2022-10-13\347\254\254\344\270\200\346\254\241\347\254\224\350\256\260js\345\237\272\347\241\200.md" new file mode 100644 index 0000000..ca3f74c --- /dev/null +++ "b/39\351\231\206\345\273\272\351\224\213/2022-10-13\347\254\254\344\270\200\346\254\241\344\275\234\344\270\232js\345\237\272\347\241\200/2022-10-13\347\254\254\344\270\200\346\254\241\347\254\224\350\256\260js\345\237\272\347\241\200.md" @@ -0,0 +1,59 @@ +1.导入js文件运行 +相对路径:同一个文件夹 +绝对路径:从绝对路径 +2.直接嵌套进去 + + + \ No newline at end of file diff --git "a/39\351\231\206\345\273\272\351\224\213/2022-10-14\347\254\254\344\272\214\346\254\241\344\275\234\344\270\232\346\225\260\346\215\256\350\275\254\346\215\242/2022-10-14\347\254\254\344\272\214\346\254\241\347\254\224\350\256\260\346\225\260\346\215\256\350\275\254\346\215\242.md" "b/39\351\231\206\345\273\272\351\224\213/2022-10-14\347\254\254\344\272\214\346\254\241\344\275\234\344\270\232\346\225\260\346\215\256\350\275\254\346\215\242/2022-10-14\347\254\254\344\272\214\346\254\241\347\254\224\350\256\260\346\225\260\346\215\256\350\275\254\346\215\242.md" new file mode 100644 index 0000000..6eaec74 --- /dev/null +++ "b/39\351\231\206\345\273\272\351\224\213/2022-10-14\347\254\254\344\272\214\346\254\241\344\275\234\344\270\232\346\225\260\346\215\256\350\275\254\346\215\242/2022-10-14\347\254\254\344\272\214\346\254\241\347\254\224\350\256\260\346\225\260\346\215\256\350\275\254\346\215\242.md" @@ -0,0 +1,21 @@ +1.Switch +2.基本数据类型: number , boolean, string, null , undefined + var a = '5'+1 // + 其中有一个是字符串, 默认是字符串的连接 + var a = '5' // + var b = a*2 // + - * 、 %隐式类型转化 + var b = -a + console.log('类型:' + typeof b + '值:' + b);//查看数据是什么类型 +3.显示数据类型 +NaN : 非数 number +Number():转换成数字,失败会变成 NaN +false:0 true:1 null:0 undefined:NaN + +parseInt(a,radix): 将(radix)进制 转成 10进制 +//var a = 'F' //-->0 1 2 3 4 5 6 7 8 9 A B C D E F +//var b = parseInt(a,16) + +String():转成字符串 +toFixed(n):保留小数点后n位 +a.toString(radix):将十进制数的a转换成radix进制的数 +isNaN(): 是不是非数,是数字的话--》false 不是数字--》true +Math: 舍入 ceil(向上取整) floor(向下取整) round(四舍五入) \ No newline at end of file -- Gitee