上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 40 下一页
摘要: window对象的子对象中的location 1 location.href 获取当前url:"https://www.cnblogs.com/clschao/articles/10092991.html" 2 location.href="URL" // 跳转到指定页面 3 示例:location 阅读全文
posted @ 2020-05-28 22:07 竹石2020 阅读(139) 评论(0) 推荐(0)
摘要: while var a =0; while (a<10){ console.log(a); a++; } 三元运算符 var a=1; var b=2; var c=a>b ? a: b; for 循环 for (var i=0;i<10;i++){ console.log(i); } 循环遍历数组 阅读全文
posted @ 2020-05-28 21:18 竹石2020 阅读(148) 评论(0) 推荐(0)
摘要: Date对象 1 var d1 = new Date(); //获取当前时间 2 console.log(d1.toLocaleString()); //当前时间日期的字符串表示 3 //方法2:参数为日期字符串 4 var d2 = new Date("2004/3/20 11:12"); 5 c 阅读全文
posted @ 2020-05-28 00:55 竹石2020 阅读(173) 评论(0) 推荐(0)
摘要: 自定义对象{} 1 var a = {"name": "Alex", "age": 18}; 2 var d = {'name':'chao',age:18}; 键可以不加引号 3 console.log(a.name); 4 console.log(a["age"]); 5 for循环遍历自定义对 阅读全文
posted @ 2020-05-26 23:47 竹石2020 阅读(153) 评论(0) 推荐(0)
摘要: 今日内容 js引入 方式1 1 <script> 2 alert('澳门皇家赌场上线啦!!!') 3 </script> 方式2 <script src="test.html"></script> 注释 // 这是单行注释 /*这是多行注释*/ 申明变量var, var a =10; 申明变量时可以 阅读全文
posted @ 2020-05-26 21:37 竹石2020 阅读(695) 评论(0) 推荐(0)
摘要: 边框 border-style:solid; border-width:1px; border-color:red; 简写 border:1px dotted red 单独 border-top-style:solid; border-top:1px dotted red; 边框圆角 border- 阅读全文
posted @ 2020-05-26 18:27 竹石2020 阅读(142) 评论(0) 推荐(0)
摘要: 定位 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>Title</title> 6 <style> 7 .c1 { 8 background-color: red; 9 height: 阅读全文
posted @ 2020-05-25 22:15 竹石2020 阅读(272) 评论(0) 推荐(0)
摘要: 边框属性 1 <style> 2 div{ 3 border-style: solid; 4 border-color: red; 边框颜色 5 border-width: 5px; 6 width: 200px; 7 height: 200px; 8 border: 10px solid char 阅读全文
posted @ 2020-05-24 23:37 竹石2020 阅读(226) 评论(0) 推荐(0)
摘要: css属性相关 高度宽度设置,主要:只有块级标签能够设置高度宽度,内敛标签不能设置高度宽度,它的高度宽度是由内容决定的 1 <style> 2 div{ 3 background-color: red; 4 width: 100px; 5 height: 100px; 6 } 7 span{ 8 b 阅读全文
posted @ 2020-05-24 21:25 竹石2020 阅读(266) 评论(0) 推荐(0)
摘要: 伪类选择器 1 <style> 2 a:link{ # 未访问连接 3 color: green; 4 } 5 a:visited{ # 已访问连接 6 color: yellow; 7 } 8 a:hover{ #鼠标悬浮颜色 9 color: aqua; 10 } 11 a:active{ # 阅读全文
posted @ 2020-05-24 19:44 竹石2020 阅读(188) 评论(0) 推荐(0)
上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 40 下一页