会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
笔记本
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
···
10
下一页
2021年8月9日
Flex 布局语法教程
摘要: 网页布局(layout)是CSS的一个重点应用。 布局的传统解决方案,基于盒状模型,依赖 display属性 + position属性 + float属性。它对于那些特殊布局非常不方便,比如,垂直居中就不容易实现。 2009年,W3C提出了一种新的方案—-Flex布局,可以简便、完整、响应式地实现各
阅读全文
posted @ 2021-08-09 12:00 qcjdp
阅读(26)
评论(0)
推荐(0)
2021年8月5日
js中的 caller与callee用法小实例
摘要: 函数fun的caller返回调用fun的函数对象,即fun的执行环境,如果fun的执行环境为window则返回null function fun(){ console.log(fun.caller)//这里必须写在fun里面,因为caller只有函数执行过程中才有效}//结果为:null 下面包裹一
阅读全文
posted @ 2021-08-05 16:28 qcjdp
阅读(95)
评论(0)
推荐(0)
2021年8月2日
php返回jsonp格式数据
摘要: //返回jsonp格式$callback = $_GET['callback'];$arr = array('error_code'=>'1');printf("%s(%s);", $callback, json_encode($arr)); //$arr为返回数据
阅读全文
posted @ 2021-08-02 16:01 qcjdp
阅读(205)
评论(0)
推荐(0)
axios get 和 post 请求
摘要: 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
阅读(107)
评论(0)
推荐(0)
Async/await
摘要: 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
阅读(62)
评论(0)
推荐(0)
2021年7月30日
Javascript 如何能简短优雅地实现 sleep 函数?
摘要: 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
阅读(59)
评论(0)
推荐(0)
2021年7月27日
vue动态改变style值
摘要: <div class="click-box" :style="{'top':top+'px','left':left+'px'}" @click="clickBox">
阅读全文
posted @ 2021-07-27 16:52 qcjdp
阅读(976)
评论(0)
推荐(0)
2021年7月22日
import export default require module.exports
摘要: ES6 : import对应的是export default 或 export require对应的是module.exports 或 exports export导出多个对象, export default只能导出一个对象 exports只能使用语法来向外暴露内部变量:如 exports.xxx
阅读全文
posted @ 2021-07-22 14:18 qcjdp
阅读(33)
评论(0)
推荐(0)
2021年7月19日
解决img标签间距问题
摘要: <!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
阅读(275)
评论(0)
推荐(0)
prototype 原型对象继承
摘要: 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
阅读(27)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
···
10
下一页
公告
Bill
Jerry
M
Evil