会员
周边
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
贝尔塔猫
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
23
24
25
26
27
28
29
30
31
···
66
下一页
2018年5月17日
温故而知新 js 点击空白处关闭气泡
摘要: 诀窍1:使用el.contains(e) 来判断点击的区域诀窍2:使用mouseup 诀窍3:完成之后,移除事件
阅读全文
posted @ 2018-05-17 08:32 贝尔塔猫
阅读(348)
评论(0)
推荐(0)
2018年5月11日
javascript 打印错误信息 catch err
摘要: 使用 console.log(err); 是无法打印出来的。默认只能打印出错误信息。如图 需要使用console.table(err); 才可以打印。这算是一个hack吧
阅读全文
posted @ 2018-05-11 08:40 贝尔塔猫
阅读(989)
评论(0)
推荐(0)
2018年5月6日
ajax application/json 的坑
摘要: 我们习惯使用application/json方式提交,所以会在ajax中指定contentType。 但请务必注意,我们提交的data必须是纯字符串才可以。所以一般会使用JSON.stringify()来转换一下。否则后端无法接受 但请务必注意,我们提交的data必须是纯字符串才可以。所以一般会使用
阅读全文
posted @ 2018-05-06 21:25 贝尔塔猫
阅读(1656)
评论(0)
推荐(0)
nodejs 的好基友:pm2
摘要: 安装:npm install pm2 -g #全局安装pm2 查看版本:pm2 -v 自动重启: pm2 start hello.js --watch 查看列表:pm2 list 查看日志: pm2 log <id|name> 停止服务:pm2 stop <id|name>
阅读全文
posted @ 2018-05-06 09:53 贝尔塔猫
阅读(282)
评论(0)
推荐(0)
2018年4月25日
有道翻译 / 百度翻译Api
摘要: 比较推荐使用百度翻译api 不推荐有道翻译,比较水。 http://ai.youdao.com/docs/doc-trans-api.s#p02 http://ai.youdao.com/docs/doc-trans-api.s#p08
阅读全文
posted @ 2018-04-25 17:14 贝尔塔猫
阅读(404)
评论(0)
推荐(0)
PHP 正则表达式
摘要: 命名变量 多行匹配注意:(.|\n)+?
阅读全文
posted @ 2018-04-25 17:09 贝尔塔猫
阅读(154)
评论(0)
推荐(0)
php 正则替换
摘要: // 驼峰写法 function toUp ($str) { return preg_replace_callback('/\s(\w)|-(\w)/', function ($matches) { if (count($matches) > 2) { return strtoupper($matches[2]); } ...
阅读全文
posted @ 2018-04-25 15:37 贝尔塔猫
阅读(149)
评论(0)
推荐(0)
2018年4月23日
github get 请求指定页面的代码
摘要: https://raw.githubusercontent.com/dragon8github/wx-h5/master/push.sh
阅读全文
posted @ 2018-04-23 11:30 贝尔塔猫
阅读(188)
评论(0)
推荐(0)
H5 input 聚焦 置顶
摘要: myFocus (e) { this.active = true function getElementTop(element){ try { var actualTop = element.offsetTop; var current = element.offsetParent; while (current !== null){ actua...
阅读全文
posted @ 2018-04-23 10:44 贝尔塔猫
阅读(334)
评论(0)
推荐(0)
2018年4月19日
autoHotKey 一些脚本积累
摘要: 新建test.ahk,然后运行即可。
阅读全文
posted @ 2018-04-19 16:13 贝尔塔猫
阅读(1475)
评论(0)
推荐(0)
上一页
1
···
23
24
25
26
27
28
29
30
31
···
66
下一页
公告