会员
周边
众包
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
xfdyl
博客园
首页
新随笔
联系
订阅
管理
2019年11月7日
HTML5手机拍照上传
摘要: 首先需要在页面添加HTML5控件 capture="camera" 这样就可以在android5.0 或则 IOS 9.0 以上直接拉起照相机,但是这些版本之下的手机只能调用相册选择 <input type="file" capture="camera" accept="image/*" id="i
阅读全文
posted @ 2019-11-07 10:58 xfdyl
阅读(755)
评论(0)
推荐(0)
编辑
2019年9月19日
箭头函数
摘要: 常规定义函数: function add(a){ return a+2; } add(2) //输出4 使用箭头函数可以一行搞定: var add = (a) =>{ a+2 } add(2) 箭头函数的语法: (params) => { statements } 1、如果没有参数可以简化成:()
阅读全文
posted @ 2019-09-19 18:58 xfdyl
阅读(152)
评论(0)
推荐(0)
编辑
2017年5月25日
去除误认电话号码
摘要: <!-- QQ强制竖屏 --> <meta name="x5-orientation" content="portrait"> <!-- QQ强制全屏 --> <meta name="x5-fullscreen" content="true"> <!-- 去除误认电话号码 --> <meta nam
阅读全文
posted @ 2017-05-25 18:53 xfdyl
阅读(88)
评论(0)
推荐(0)
编辑
2017年5月12日
复选框全选
摘要: var checked = false; $('#checkAll').click(function() { checked = !checked; $('input').prop("checked",checked); var $subBox = $('#postList').find('inpu
阅读全文
posted @ 2017-05-12 14:21 xfdyl
阅读(115)
评论(0)
推荐(0)
编辑
2017年5月11日
提取字符串中的URL添加链接
摘要: function isURL(str){ var reg ="((http|ftp|https)://)(([a-zA-Z0-9\._-]+\.[a-zA-Z]{2,6})|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,4})*
阅读全文
posted @ 2017-05-11 11:30 xfdyl
阅读(176)
评论(0)
推荐(0)
编辑
2017年3月10日
实用小技巧
摘要: 1、手机页面上按钮点击有阴影,如何去掉? a{ -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; -webkit-user-select: none; } 2、元素高度是百分比,里面的文字居中显示: div{
阅读全文
posted @ 2017-03-10 17:55 xfdyl
阅读(144)
评论(0)
推荐(0)
编辑
2017年2月24日
React Native 中 component 生命周期
摘要:
阅读全文
posted @ 2017-02-24 11:13 xfdyl
阅读(66)
评论(0)
推荐(0)
编辑