随笔分类 -  1-js

摘要:参考文: 以下 3 个判断数组的方法,请分别介绍它们之间的区别和优劣Object.prototype.toString.call() 、 instanceof 以及 Array.isArray() https://github.com/Advanced-Frontend/Daily-Intervie 阅读全文
posted @ 2019-07-31 14:58 JIN__JIN 阅读(536) 评论(0) 推荐(0)
摘要:破解递归爆栈的深拷贝 https://juejin.im/post/5c45112e6fb9a04a027aa8fe#heading-11 递归爆栈问题 https://blog.csdn.net/weixin_34151004/article/details/88452339 函数 caller 阅读全文
posted @ 2019-07-26 17:18 JIN__JIN 阅读(845) 评论(0) 推荐(0)
摘要:最近做了一个导出功能,代码如下 import request from 'request-promise-native'; export default class Form { // 导出 @post('/export') public async export(ctx) { const para 阅读全文
posted @ 2019-04-04 10:29 JIN__JIN 阅读(8705) 评论(0) 推荐(0)
摘要:1. 浏览器的js实现中文排序 参照地址: https://blog.csdn.net/qq_29819449/article/details/80520590 2. 浏览器的js实现方式的缺点 2.1 can i use 网站 目前浏览器对js中文排序方法的支持也不是太好:https://cani 阅读全文
posted @ 2019-02-26 10:44 JIN__JIN 阅读(1533) 评论(1) 推荐(0)
摘要:原文:https://zhidao.baidu.com/question/1701946584925153620.html 要想精确验证,最容易想到的方法就是通过月份判断日期是否合法(1~28/29/30/31),你可以用一个数组表示每月的天数,如daysInMonth=[31,28,31,30,3 阅读全文
posted @ 2019-02-20 10:44 JIN__JIN 阅读(3881) 评论(1) 推荐(0)
摘要:base64编码的字符串(含有中文) 前端解码 https://xue5602.github.io/2018/12/19/atob%E8%A7%A3%E7%A0%81utf-8%E5%AD%97%E7%AC%A6/#comments 解码关键函数释义 https://blog.csdn.net/er 阅读全文
posted @ 2019-01-02 14:28 JIN__JIN 阅读(2208) 评论(0) 推荐(0)
摘要:JavaScript深入之内存空间详细图解 https://juejin.im/post/5bf4c3eff265da613356348a 理解javascript中的连续赋值 https://www.cnblogs.com/Gavin257/p/9562214.html JavaScript 的连 阅读全文
posted @ 2018-12-13 10:03 JIN__JIN 阅读(107) 评论(0) 推荐(0)
摘要:普通xx.js文件 import * as x from "xx.js"; console.log(x); import x from "xx.js"; console.log(x); 效果与 console.log(require('xx.js')) 相同 与 import * as x from 阅读全文
posted @ 2018-09-12 15:23 JIN__JIN 阅读(430) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/kongxy/p/4618173.html 在JavaScript中,对象的属性分为可枚举和不可枚举之分,它们是由属性的enumerable值决定的。可枚举性决定了这个属性能否被for…in查找遍历到。 一、怎么判断属性是否可枚举 js中基本包装类型的 阅读全文
posted @ 2018-08-29 11:02 JIN__JIN 阅读(9086) 评论(0) 推荐(1)
摘要:http://blog.csdn.net/zc474235918/article/details/53138553 阅读全文
posted @ 2017-12-02 10:26 JIN__JIN 阅读(1613) 评论(0) 推荐(0)
摘要:js方式有bug 不知道问题在哪里 阅读全文
posted @ 2017-10-12 11:42 JIN__JIN 阅读(394) 评论(0) 推荐(0)
摘要:微信更换上一次记录地址 history.replaceState({}, window.location.href, that.opt.path + "/index") window.location.href=that.opt.path + "/index"; 阅读全文
posted @ 2017-08-02 15:59 JIN__JIN 阅读(190) 评论(0) 推荐(0)
摘要:Date.prototype.Format = function(fmt){ var o = { "M+" : this.getMonth()+1, //月份 "d+" : this.getDate(), //日 "h+" : this.getHours(), //小时 "m+" : this.ge 阅读全文
posted @ 2017-07-31 17:24 JIN__JIN 阅读(286) 评论(0) 推荐(0)
摘要:$(window).scroll(function(){ var supportPageOffset = window.pageXOffset !== undefined; // 判断是否支持pageXOffset var isCSS1Compat = ((document.compatMode | 阅读全文
posted @ 2017-07-17 09:35 JIN__JIN 阅读(1407) 评论(1) 推荐(0)
摘要:原文地址 http://blog.csdn.net/flashdelover/article/details/8185775 jQuery有方法$.fn.serialize,可将表单序列化成字符串;有方法$.fn.serializeArray,可将表单序列化成数组。如果需要其序列化为JSON对象,那 阅读全文
posted @ 2017-07-14 17:55 JIN__JIN 阅读(1311) 评论(0) 推荐(0)
摘要:jQuery中效果animate方法解决width是百分比出现的问题 http://www.mafutian.net/131.html 问题描述: 效果如图,初始化,每个层宽20%,采用animate,让选中的层,宽度80%,其他层宽5% 动画执行时,会导致所有层宽超出100%,最后一个层移到下一行 阅读全文
posted @ 2017-07-11 14:26 JIN__JIN 阅读(1353) 评论(0) 推荐(0)
摘要:http://www.111cn.net/wy/js-ajax/94218.htm 手机版网页js倒计时存在的问题与解决的方法 www.111cn.net 更新:2015-09-16 编辑:kp12345 来源:转载 手机版网页js倒计时存在的问题与解决的方法 www.111cn.net 更新:20 阅读全文
posted @ 2017-05-24 17:57 JIN__JIN 阅读(1029) 评论(0) 推荐(0)
摘要:function keyUpEvt(obj, ctype){ if(obj.value>0){ if(/^0/.test(obj.value)){ $(obj).val(parseInt(obj.value)); } }else { obj.value = obj.value.replace(/\D/g, ''); ... 阅读全文
posted @ 2017-04-28 14:57 JIN__JIN 阅读(134) 评论(0) 推荐(0)
摘要:http://blog.csdn.net/alanzyy/article/details/53896230 个人实践 阅读全文
posted @ 2017-03-13 15:23 JIN__JIN 阅读(3037) 评论(0) 推荐(0)
摘要:http://www.17sucai.com/pins/demoshow/10439 http://www.17sucai.com/pins/10439.html jQuery图片裁剪插件可缩放上传图片裁剪代码 http://www.17sucai.com/pins/1468.html 原生js图片 阅读全文
posted @ 2017-03-11 11:14 JIN__JIN 阅读(208) 评论(0) 推荐(0)