会员
周边
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
武卡卡的个人博客
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
61
62
63
64
65
66
67
68
69
···
77
下一页
2019年9月8日
JS - if(flag) if(!flag)
摘要: 1, if(flag) 判断是否为 true 2, if(!flag) 判断是否为false
阅读全文
posted @ 2019-09-08 11:18 武卡卡
阅读(1293)
评论(0)
推荐(0)
2019年9月7日
Express - 采用bcryptjs进行密码加密
摘要: 1.安装bcryptjs模块 2.在需要加密的模块中引入bcryptjs库 require('bcryptjs'); 实战 : /** * 定义数据库模型 */ const userSchema = new mongoose.Schema({ username:{ type:String, uniq
阅读全文
posted @ 2019-09-07 21:54 武卡卡
阅读(1414)
评论(3)
推荐(2)
2019年9月6日
CSS - 设置placeholder样式
摘要: input::placeholder { font-size: 12px; font-family: Arial; letter-spacing: 5px; color: red !important; text-align: center; } input::placeholder { font-
阅读全文
posted @ 2019-09-06 15:45 武卡卡
阅读(15458)
评论(0)
推荐(3)
2019年9月3日
JS - 使 canvas 背景透明
摘要: canvas = document.getElementById('canvas1'); var context = canvas.getContext('2d');context.fillStyle = 'rgba(255, 255, 255, 0)' var context = canvas.g
阅读全文
posted @ 2019-09-03 17:12 武卡卡
阅读(6773)
评论(0)
推荐(0)
JS - 获取页面滚动的高度
摘要: document.documentElement.scrollTop||document.body.scrollTop
阅读全文
posted @ 2019-09-03 13:46 武卡卡
阅读(5548)
评论(0)
推荐(1)
JS - 获取数组中的最后1个
摘要: arr = [1,2,3,4,5] console.log(arr[arr.length-1]) //输出的为5,即最后一个
阅读全文
posted @ 2019-09-03 13:17 武卡卡
阅读(1726)
评论(0)
推荐(1)
2019年8月30日
CSS - flex 垂直水平居中
摘要: display: flex; justify-content: center; /* 水平居中 */ align-items: center; /* 垂直居中 */
阅读全文
posted @ 2019-08-30 14:53 武卡卡
阅读(197)
评论(0)
推荐(0)
JS - input输入框点击回车提交或者进行别的操作
摘要: $("input").keydown(function(event){ if (event.keyCode == 13) { /* 提交或者别的操作 */ } }); $("input").keydown(function(event){ if (event.keyCode == 13) { /*
阅读全文
posted @ 2019-08-30 11:32 武卡卡
阅读(1667)
评论(0)
推荐(0)
2019年8月29日
JS - 查找字符串中的某个值,截取其之前。和之后的值
摘要: var str = "11:222"; /* * 截取 “ :”之前和之后的值 */document.write(str.split(':')[0]) //输出11document.write(str.split(':')[1]) //输出222
阅读全文
posted @ 2019-08-29 14:15 武卡卡
阅读(7198)
评论(0)
推荐(0)
2019年8月18日
CocosCreator - 向上传递事件(冒泡)
摘要: /** * 分发事件到事件流中。 * this.node.dispatchEvent(new cc.Event.EventCustom("name",是否向上传递)) * true:向上传递,传递到父节点。 * false:向下传递 */ var e = new cc.Event.EventCust
阅读全文
posted @ 2019-08-18 12:31 武卡卡
阅读(1341)
评论(0)
推荐(0)
上一页
1
···
61
62
63
64
65
66
67
68
69
···
77
下一页
公告