摘要: function bytesToSize(bytes) { if (bytes 0) return '0 B'; var k = 1024; sizes = ['B','KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; i = Math.floor(Ma 阅读全文
posted @ 2016-09-23 15:27 James2019 阅读(6179) 评论(0) 推荐(1)
摘要: $.ajax({ url : picSrc, async : false, type : 'HEAD', error : function() { picSrc = "https://ss0.bdstatic.com/5aV1bjqh_Q23odCf/static/superman/img/logo 阅读全文
posted @ 2016-09-23 10:16 James2019 阅读(3262) 评论(0) 推荐(0)
摘要: 1.substr substr(start,length)表示从start位置开始,截取length长度的字符串。 var src="images/off_1.png";alert(src.substr(7,3)); 弹出值为:off 2.substring substring(start,end) 阅读全文
posted @ 2016-09-22 18:08 James2019 阅读(1965) 评论(0) 推荐(0)
摘要: 1,父 html 调用子 iframe 内方法: 2,子 Iframe 中 调用 父html中方法: 在VUE中: randomObj: { edit: 'edit_' + new Date().getTime() // 先定义随机ID } } }, randomObj: { edit: 'edit 阅读全文
posted @ 2016-09-22 13:15 James2019 阅读(46496) 评论(0) 推荐(1)
摘要: ueditor demo 阅读全文
posted @ 2016-09-21 11:05 James2019 阅读(2751) 评论(0) 推荐(0)
摘要: 如下图同Excel表格首行固定: 阅读全文
posted @ 2016-09-20 15:46 James2019 阅读(3306) 评论(0) 推荐(0)
摘要: 中文: [\u4e00-\u9fa5] 空格 \s 仅限数字,排除其他所有 \D并且: | // js正则表达式替换空格 str.replace(/^\s+|\s+$/g, '') 解析: str:要替换的字符串 \s : 表示 space ,空格 +: 一个或多个 ^: 开始,^\s,以空格开始 阅读全文
posted @ 2016-09-20 13:15 James2019 阅读(626) 评论(0) 推荐(0)
摘要: 如图:仿 title="查看" note="查看",note 可换成其他 样式: 阅读全文
posted @ 2016-09-19 13:48 James2019 阅读(1222) 评论(0) 推荐(0)
摘要: 如截图: 阅读全文
posted @ 2016-09-19 13:09 James2019 阅读(7996) 评论(0) 推荐(0)
摘要: 下面是网络收集: jquery判断checked的三种方法:.attr('checked): //看版本1.6+返回:”checked”或”undefined” ;1.5-返回:true或false.prop('checked'): //16+:true/false.is(':checked'): 阅读全文
posted @ 2016-09-18 17:27 James2019 阅读(2696) 评论(0) 推荐(0)