该文被密码保护。 阅读全文
posted @ 2020-10-09 20:45 江苏丶刘德华 阅读(1) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2020-09-10 17:58 江苏丶刘德华 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 1,绑定一个class名 <p [class.isActive]="boolean"> p element works! </p> 也可 <p [class.isActive]="fn()"> p element works! </p> fn(){ return boolean } 2,绑定多个cl 阅读全文
posted @ 2019-08-28 10:16 江苏丶刘德华 阅读(358) 评论(0) 推荐(0) 编辑
摘要: <!-- input表单type属性值: --> <!-- type = "email" 限制用户输入必须为Email类型 --> email<input type="email"> <!-- type="url" 限制用户输入必须为URL类型 --> url<input type="url"> < 阅读全文
posted @ 2019-01-29 15:16 江苏丶刘德华 阅读(595) 评论(0) 推荐(0) 编辑
摘要: <script> //(1)函数声明 // 不能直接在后面加()执行,可以在前面加 +,-,! 等让他立即执行,执行完函数a销毁 // 报错 // function a(){ // console.log('111') // }() //不报错,执行 +function a(){ console.l 阅读全文
posted @ 2019-01-29 10:58 江苏丶刘德华 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 1,安装Swiper 阅读全文
posted @ 2019-01-04 15:18 江苏丶刘德华 阅读(923) 评论(0) 推荐(0) 编辑
摘要: <div id="box" class="box" title="abc" style="width:100px;height:100px;">123</div> <script> var oBox=document.getElementById('box'); //Attribute consol 阅读全文
posted @ 2019-01-03 13:22 江苏丶刘德华 阅读(3186) 评论(0) 推荐(0) 编辑
摘要: //去掉左右空格兼容 var str=' ab c '; var re=/^\s+ | \s+$/g; if(String.prototype.trim){ console.log(str.trim()+'111') }else{ console.log(str.replace(re,'')+'22 阅读全文
posted @ 2018-12-21 10:36 江苏丶刘德华 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 匿名函数(自执行函数) 写法: ①( function( ){ } )( ) ②(function( ) { } ( )) 传参 : ( function( a,b){ console.log(a+b) } ) ( 10,20 ) 闭包:函数嵌套函数,里面的函数引用外面函数的变量,这些变量不会被释放 阅读全文
posted @ 2018-12-20 20:16 江苏丶刘德华 阅读(164) 评论(0) 推荐(0) 编辑
摘要: console.log(4&&5) //5 console.log(0&&0) //0 console.log(0&&5) //0 console.log(5&&0) //0 // &&中如果两边都没有0,则取后面的那个。 // 如果有0,或者两个0,则取0 console.log(4||5) // 阅读全文
posted @ 2018-12-11 13:37 江苏丶刘德华 阅读(125) 评论(0) 推荐(0) 编辑