上一页 1 2 3 4 5 6 ··· 10 下一页
摘要: 网页布局(layout)是CSS的一个重点应用。 布局的传统解决方案,基于盒状模型,依赖 display属性 + position属性 + float属性。它对于那些特殊布局非常不方便,比如,垂直居中就不容易实现。 2009年,W3C提出了一种新的方案—-Flex布局,可以简便、完整、响应式地实现各 阅读全文
posted @ 2021-08-09 12:00 qcjdp 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 函数fun的caller返回调用fun的函数对象,即fun的执行环境,如果fun的执行环境为window则返回null function fun(){ console.log(fun.caller)//这里必须写在fun里面,因为caller只有函数执行过程中才有效}//结果为:null 下面包裹一 阅读全文
posted @ 2021-08-05 16:28 qcjdp 阅读(86) 评论(0) 推荐(0) 编辑
摘要: //返回jsonp格式$callback = $_GET['callback'];$arr = array('error_code'=>'1');printf("%s(%s);", $callback, json_encode($arr)); //$arr为返回数据 阅读全文
posted @ 2021-08-02 16:01 qcjdp 阅读(186) 评论(0) 推荐(0) 编辑
摘要: get请求axios.get('/user', { params: { ID: 12345 } }) .then(function (response) { console.log(response); }) .catch(function (error) { console.log(error); 阅读全文
posted @ 2021-08-02 10:47 qcjdp 阅读(106) 评论(0) 推荐(0) 编辑
摘要: async 总是返回一个promise async function f() { return 1 } f().then(alert) // 1 我们也可以显式的返回一个promise,这个将会是同样的结果: async function f() { return Promise.resolve(1 阅读全文
posted @ 2021-08-02 10:22 qcjdp 阅读(60) 评论(0) 推荐(0) 编辑
摘要: async function test() { console.log('Hello') await sleep(1000) console.log('world!')} function sleep(ms) { return new Promise(resolve => setTimeout(re 阅读全文
posted @ 2021-07-30 22:22 qcjdp 阅读(55) 评论(0) 推荐(0) 编辑
摘要: <div class="click-box" :style="{'top':top+'px','left':left+'px'}" @click="clickBox"> 阅读全文
posted @ 2021-07-27 16:52 qcjdp 阅读(946) 评论(0) 推荐(0) 编辑
摘要: ES6 : import对应的是export default 或 export require对应的是module.exports 或 exports export导出多个对象, export default只能导出一个对象 exports只能使用语法来向外暴露内部变量:如 exports.xxx  阅读全文
posted @ 2021-07-22 14:18 qcjdp 阅读(29) 评论(0) 推荐(0) 编辑
摘要: <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>test</title> <link rel="stylesheet" type="text/css" href="css/test.css"> </head> 阅读全文
posted @ 2021-07-19 16:30 qcjdp 阅读(226) 评论(0) 推荐(0) 编辑
摘要: a继承b <script> function b(){ this.bname = "99"; } function a(){ this.aname = "5"; } a.prototype = new b(); a.prototype.cname = "66"; var a = new a(); c 阅读全文
posted @ 2021-07-19 09:33 qcjdp 阅读(22) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 10 下一页

Bill

Jerry

Evil