随笔分类 - JS浏览器窗口
摘要:一般用于本地存储中使用(中英文切换本地存储,刷新页面): location.reload();
阅读全文
摘要:BOM:浏览器对象模型 新窗口打开window.open(url)当前页打开:location.href = url
阅读全文
摘要://分辨率兼容 ;(function(win,doc){ var rem = 40/750*doc.documentElement.clientWidth; doc.documentElement.style.fontSize=rem+'px'; win.addEventListener('resi
阅读全文
摘要:var source_platform = '' , pf_source = 2; //系统平台 //区别是否是 微信浏览器 , source_platform 系统平台 2018.12.6新增 var ua = navigator.userAgent, source_platform = '';
阅读全文
摘要:通过userAgent是否包含MicroMessenger来判断是否在微信内置浏览器打开网页 //区别是否是 微信浏览器 , source_platform 系统平台 var ua = navigator.userAgent , source_platform = ''; if (ua.match(
阅读全文
摘要:网页可见区域宽:document.body.clientWidth 网页可见区域高:document.body.clientHeight 网页可见区域宽:document.body.offsetWidth (包括边线的宽) 网页可见区域高:document.body.offsetHeight (包括
阅读全文