上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 49 下一页
摘要: 1. 网页源码 <body> <header class="text-center"> <h1>JavaScript_DOM</h1> </header> <section class="container"> <div class="form p-4 bg-dark text-light text 阅读全文
posted @ 2022-11-10 16:12 LeoShi2020 阅读(28) 评论(0) 推荐(0)
摘要: 1. 面向对象 // 大括号就是对象 p = { a:1, b:2, c:3, } // 系统对象全部基于window // console.log(window); // window.alert(1); // alert(2); // console.log(navigator.appVersi 阅读全文
posted @ 2022-11-10 12:05 LeoShi2020 阅读(26) 评论(0) 推荐(0)
摘要: 1. 函数 function addNums(num1=1,num2=2) { console.log('num1 + num2:',num1 + num2); return num1 + num2; } addNums(); addNums(5,6); console.log('addNums() 阅读全文
posted @ 2022-11-09 23:53 LeoShi2020 阅读(31) 评论(0) 推荐(0)
摘要: 1. Switch // Switch 语句 const color = 'green'; switch (color) { case 'red': console.log('color is red'); break; case 'blue': console.log('color is blue 阅读全文
posted @ 2022-11-09 23:24 LeoShi2020 阅读(20) 评论(0) 推荐(0)
摘要: 1. 语句 // if 语句 let x = 10; if (x == 10) { console.log('x is 10') }; // if else if else x = 20; if (x 10) { console.log('x is 10'); } else if (x > 10) 阅读全文
posted @ 2022-11-09 23:19 LeoShi2020 阅读(40) 评论(0) 推荐(0)
摘要: 1. 语句 // For语句 for (let index = 0; index <=6; index++) { console.log(`For Loop Number:${index}`); } // While语句 let i = 0; while (i <=6) { console.log( 阅读全文
posted @ 2022-11-09 23:03 LeoShi2020 阅读(24) 评论(0) 推荐(0)
摘要: 1. 变量 // Javascript常用变量类型 // numbers,string,boolean, // Object:Array,Undefined,null // const 常量不能修改 // let和var 变量可修改 const name ="Tom"; const age = 22 阅读全文
posted @ 2022-11-09 22:31 LeoShi2020 阅读(44) 评论(0) 推荐(0)
摘要: <!-- .test 生成class为test的div --> <div class="test"></div> <!-- #test 生成id为test的div --> <div id="test"></div> <!-- .test>a#test --> <div class="test"><a 阅读全文
posted @ 2022-11-09 14:23 LeoShi2020 阅读(55) 评论(0) 推荐(0)
摘要: <!-- 随机生成3段文字 lorem*3 --> Lorem ipsum dolor, sit amet consectetur adipisicing elit. Facere repellendus et eius, dicta culpa repellat, at deleniti repu 阅读全文
posted @ 2022-11-09 13:58 LeoShi2020 阅读(602) 评论(0) 推荐(0)
摘要: 1. 修改首选项配置 2. 打开控制折叠方式 搜索 word wrap END 阅读全文
posted @ 2022-11-09 12:14 LeoShi2020 阅读(56) 评论(0) 推荐(0)
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 49 下一页