摘要: GitHub: https://github.com/skillnull/Get-Device-Info 在线实例:http://skillnull.com/others/GetDeviceInfo/index.html 阅读全文
posted @ 2018-04-10 17:33 SKILL·NULL 阅读(6041) 评论(0) 推荐(0) 编辑
摘要: /** * @function Determine if the image has been loaded. * @param img,callback */ function imgIsLoaded(img, callback) { var timer = setInterval(functio 阅读全文
posted @ 2018-04-10 17:02 SKILL·NULL 阅读(253) 评论(0) 推荐(0) 编辑
摘要: /** * 如果target(也就是FirstOBJ[key])存在, * 且是对象的话再去调用deepObjectMerge, * 否则就是FirstOBJ[key]里面没这个对象,需要与SecondOBJ[key]合并 */function deepObjectMerge(FirstOBJ, S 阅读全文
posted @ 2018-04-10 16:51 SKILL·NULL 阅读(5487) 评论(0) 推荐(0) 编辑
摘要: /** * @function Monitor whether the document tree is loaded. * @param fn */function domReady(fn) { if (document.addEventListener) { // 标准浏览器 document. 阅读全文
posted @ 2018-04-10 16:48 SKILL·NULL 阅读(480) 评论(0) 推荐(0) 编辑
摘要: 如果页面a.html引用了b.js,b.js里的方法需要在页面资源加载完成后执行,即在window.onload里执行;这时如果a.html里使用了window.onload方法,b.js就不能重复调用这个方法了,因为window.onload不能同时使用多个,否则后者会覆盖前者。可以用如下方法解决 阅读全文
posted @ 2018-04-10 16:31 SKILL·NULL 阅读(1858) 评论(0) 推荐(0) 编辑