会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
大耳朵小虎
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
7
8
9
10
11
12
13
下一页
2018年2月27日
3. JS生成32位随机数
摘要: function randomWord ( randomFlag,min,max ) { var str = " ", range = min, arr = ['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f']; //随机
阅读全文
posted @ 2018-02-27 10:32 大耳朵小虎
阅读(1282)
评论(0)
推荐(0)
2018年2月8日
JS大小转化B KB MB GB的转化方法
摘要: function conver(limit){ var size = ""; if( limit < 0.1 * 1024 ){ //如果小于0.1KB转化成B size = limit.toFixed(2) + "B"; }else if(limit < 0.1 * 1024 * 1024 ){
阅读全文
posted @ 2018-02-08 11:45 大耳朵小虎
阅读(402)
评论(0)
推荐(0)
2018年1月31日
7.关于一些dom&&获取元素
摘要: 1. 测试点击的是否是span 标签 <span onClick={this.select.bind(this)}>点击</span> select( e ){ console.log(e.target.matches(`${'span'}`)) } 注:` `位EMC5字符串模板 `${xx}($
阅读全文
posted @ 2018-01-31 10:29 大耳朵小虎
阅读(95)
评论(0)
推荐(0)
2018年1月26日
加密问题
摘要: 1. https : https 部署 通过letsencrypt(https://letsencrypt.org/)获取的免费https证书。不是正规的渠道获取https证书 浏览器上会出现安全问题无法跳转
阅读全文
posted @ 2018-01-26 17:18 大耳朵小虎
阅读(102)
评论(0)
推荐(0)
2018年1月23日
2.hover的使用
摘要: 1. 自身的hover div :hover{ :hover前要有空格 } 2.hover指向子元素 father:hover .childer { :hover前不能有空格 } 3.hover指向相邻元素 .pre:hover +.nex { :hover前不能有空格 }
阅读全文
posted @ 2018-01-23 18:08 大耳朵小虎
阅读(144)
评论(0)
推荐(0)
2018年1月16日
6.生命周期
摘要: 1. 被更新时触发 componentDidUpdate(prevProps, prevState){ const typrval = this.props.typrval; if (typrval prevProps.typrval) { return } (需要执行的函数) }2. 基本顺序 c
阅读全文
posted @ 2018-01-16 18:35 大耳朵小虎
阅读(104)
评论(0)
推荐(0)
1.键盘消失,阻止键盘弹出
摘要: 1. document.activeElement.blur(); 苹果下会出现一个完成的tab,去掉方法如下: <input id="job" onfocus="this.blur()"> 输入框添加:onfocus="this.blur()"
阅读全文
posted @ 2018-01-16 18:32 大耳朵小虎
阅读(128)
评论(0)
推荐(0)
5. react父子组件
摘要: 1. 父组件如何获取子组件的方法以及属性? 1.)父组件: render( ){ console.log( this.refs.getmethod ); return ( <div> <children ref="getmethod" /> </div> ) } 2.)子组件: 属性 方法
阅读全文
posted @ 2018-01-16 15:12 大耳朵小虎
阅读(101)
评论(0)
推荐(0)
2018年1月12日
CSS- 一些少用的
摘要: 1. 字体间距 1.)word-spacing: 2.)letter-spacing: 3.)text-indent 4.)text-align-last: justify; 和 text-align: justify; 两端对齐 2.textarea textarea 标签彻底禁用拖动(推荐)re
阅读全文
posted @ 2018-01-12 18:29 大耳朵小虎
阅读(99)
评论(0)
推荐(0)
JS-Array-新增方法
摘要: 1. filter( ) var arr = [5,4,3,2,1]; newarr = arr.filter((item)=>{ return item<3 }) ; // => [2,1] 2. every( ) 和 some( ) var arr = [5,4,3,2,1]; newarr =
阅读全文
posted @ 2018-01-12 17:10 大耳朵小虎
阅读(191)
评论(0)
推荐(0)
上一页
1
···
7
8
9
10
11
12
13
下一页
公告