摘要: function getQueryString(name) { var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i'); var r = window.location.search.substr(1).match(reg); if(r 阅读全文
posted @ 2017-07-08 13:21 Sun_Song 阅读(111) 评论(0) 推荐(0) 编辑
摘要: function isMobile() { if(/android/i.test(navigator.userAgent)) { //document.write("This is Android'browser.");//这是Android平台下浏览器 return true; } if(/(iP 阅读全文
posted @ 2017-07-08 13:20 Sun_Song 阅读(181) 评论(0) 推荐(0) 编辑
摘要: function comptime(beginTime) { var nowtime = (new Date).getTime(); endTime = nowtime; var secondNum = parseInt((endTime - beginTime * 1000) / 1000); / 阅读全文
posted @ 2017-07-08 13:19 Sun_Song 阅读(474) 评论(0) 推荐(0) 编辑
摘要: document.setTitle = function(t) { document.title = t; var i = document.createElement('iframe'); i.src = '//m.baidu.com/favicon.ico'; i.style.display = 阅读全文
posted @ 2017-07-08 13:19 Sun_Song 阅读(259) 评论(0) 推荐(0) 编辑