摘要:
数组类型 Array可以包含任意的数据类型 var arr = [1,2,3,4,5]; //通过下标取值和赋值 arr[0]; arr[0] = 1; 1.长度 arr.length 注意 加入给arr.length赋值,数组大小就会发生变化,如果赋值过小,元素就会丢失 2.indexOf通过元素 阅读全文
posted @ 2021-06-27 23:24
琪琪又炸毛了
阅读(69)
评论(0)
推荐(0)
摘要:
字符串 1.正常字符串我们使用,单引号'' , 双引号"" 包裹 2.注意转义字符\ console.log('a'); //a console.log('a\nb'); //换行 console.log('a\tb'); //Tab console.log('\u4e2d'); //Unicode 阅读全文
posted @ 2021-06-27 19:22
琪琪又炸毛了
阅读(40)
评论(0)
推荐(0)
摘要:
严格检查模式strict 前提 : IDEA需要设置支持ES6语法 'use strict';严格检查模式,预防JavaScript的随意性导致产生的一些问题 必须写在JavaScript的第一行 代码: <!DOCTYPE html> <html lang="en"> <head> <meta c 阅读全文
posted @ 2021-06-27 18:25
琪琪又炸毛了
阅读(59)
评论(0)
推荐(0)
摘要:
数据类型 number js不区分小数和整数,Number 123 //整数123 123.1 //浮点数123.1 1.123e3 //科学计数法 -99 //复数 NaN //not a number Infinity//表示无限大 字符串 'abc' , "abc" 布尔值 true , fa 阅读全文
posted @ 2021-06-27 16:00
琪琪又炸毛了
阅读(45)
评论(0)
推荐(0)
摘要:
浏览器控制台使用 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>浏览器控制台使用</title> </head> <body> <!-- JavaScript严格区分大小写! --> <script 阅读全文
posted @ 2021-06-27 14:34
琪琪又炸毛了
阅读(491)
评论(0)
推荐(0)
摘要:
JS基本使用 内部标签 <!-- 内部标签: script标签内,写Javascript代码 --> <script> alert('Hello,World!'); </script> 外部引入 <!-- 外部引入 --> <!-- 注意:script标签必须成对出现 --> <script src 阅读全文
posted @ 2021-06-27 12:55
琪琪又炸毛了
阅读(97)
评论(0)
推荐(0)
摘要:
z-index 及透明度 z-index 图层 默认是0,最高无限 .box{ position: relative; } div:nth-of-type(1){ width: 200px; height: 200px; background: #c3d23b; border: 1px soli 阅读全文
posted @ 2021-06-27 01:10
琪琪又炸毛了
阅读(92)
评论(0)
推荐(0)
摘要:
定位 相对定位 相对定位 : position: relative; 相对于原来的位置,进行指定的偏移,相对定位的话,他仍然在文档流中 top : 10px; 距离上方移动10px (向下) left bottom right :-20px; 距离右方移动-20px (向右) html : <!DO 阅读全文
posted @ 2021-06-27 00:25
琪琪又炸毛了
阅读(54)
评论(0)
推荐(0)


浙公网安备 33010602011771号