面试题
摘要:释: setTimeout是一次执行函数,这里是1秒后执行,仅仅执行一次;for(var i=0;i<10;i++),i的每次取值都是执行setTimeout这个函数,并没有执行setTimeout里面的function(即闭包函数),setTimeout里面的function是有setTimeou
阅读全文
posted @
2017-10-11 16:46
thelongmarch
阅读(109)
推荐(0)
随记
摘要:下面总结一下js中时间戳与日期格式的相互转换: 1. 将时间戳转换成日期格式: 1 2 3 4 5 6 7 8 9 10 11 12 function timestampToTime(timestamp) { var date = new Date(timestamp * 1000);//时间戳为1
阅读全文
posted @
2017-10-11 10:47
thelongmarch
阅读(137)
推荐(0)
一道经典面试题-----setTimeout(function(){},0)
摘要:出处:http://www.qdfuns.com/notes/17398/e8a1ce8f863e8b5abb530069b388a158/page/3.html#tagsbar 效果: console.log: 0 console.log: 1 console.log: 2 结果是:0 1 2 3
阅读全文
posted @
2017-10-10 13:33
thelongmarch
阅读(833)
推荐(0)
网址总结随机
摘要:jsonp 原理(看这两篇足够了): http://www.cnblogs.com/yuqingfamily/p/6878612.html http://blog.csdn.net/chunlaiqingke/article/details/78164781
阅读全文
posted @
2017-10-09 14:10
thelongmarch
阅读(131)
推荐(0)