Clover

Results 15 comments of Clover

// 双飞翼 middle left right * { margin: 0; padding: 0; } .fl { float: left; } .middle { width: 100%; height: 200px; background-color: red; } .insider { margin: 0...

// 弹性布局实现 .container { height: 200px; display: flex; } .left { width: 100px; background-color: green; } .right { width: 200px; background-color: blue; } .middle { flex: 1; background-color: red; }...

function removeStr(str) { const reg = /[\t\n\v\r\f]/g; const newStr = str.replace(reg, ""); return newStr; } removeStr("我阿萨德啊\ns\f as\n\r d");

作为参数传递的函数, new Promise((resolve,reject)=>{ try{ // do sth resolve() } catch(err=>console.log(err)) })

(字符串) 字符串:String 正则:RegExp (数字和日期对象) 日期:Date 数学:Math 数值:Number 大数:BigInt (错误对象) 错误:Error ... (基本对象) 布尔值:Boolean 唯一值:Symbol 对象:Object 函数:Function (可索引集合对象) 数组:Array (键集合对象) Map,Set,WeakMap,WeakSet https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects

const str = "hello world"; function enCode(str) { let key = String.fromCharCode(str.charCodeAt(0) + str.length); for (let i = 1; i < str.length; i++) { key += String.fromCharCode(str.charCodeAt(i) + str.charCodeAt(i -...

let code = escape("hello_world"); let decode = unescape(code); console.log(decode);