摘要: $(function () { var isPageHide = false; window.addEventListener('pageshow', function () { if (isPageHide) { window.location.reload(); } }); window.add 阅读全文
posted @ 2018-02-07 17:40 夏天的冰淇淋 阅读(128) 评论(0) 推荐(0) 编辑
摘要: //data-main ,引入主文件main.js 1 require.config({ 2 paths:{ 3 jquery:'jquery-1.11.3.min' 4 } 5 }); 6 requirejs(['jquery','validate'],function ($,validate) { 7 $('body').css('backgro... 阅读全文
posted @ 2017-05-12 14:16 夏天的冰淇淋 阅读(140) 评论(0) 推荐(0) 编辑
摘要: https://github.com/RubyLouvre/mobileHack 阅读全文
posted @ 2017-03-07 23:04 夏天的冰淇淋 阅读(110) 评论(0) 推荐(0) 编辑
摘要: http://www.ydcss.com/archives/18 阅读全文
posted @ 2017-03-07 22:49 夏天的冰淇淋 阅读(86) 评论(0) 推荐(0) 编辑
摘要: //获取当前时间,格式YYYY-MM-DD function getNowFormatDate() { var date = new Date(); var seperator1 = "-"; var year = date.getFullYear(); var month = date.getMonth() + 1; ... 阅读全文
posted @ 2017-03-02 14:31 夏天的冰淇淋 阅读(173) 评论(0) 推荐(0) 编辑
摘要: Document (function(doc,win){ var preview = function(){ this.win_w=doc.body.offsetWidth; //屏幕宽度 this.win_h=doc.documentElement.clientH... 阅读全文
posted @ 2017-02-23 21:08 夏天的冰淇淋 阅读(746) 评论(0) 推荐(0) 编辑
摘要: 手机浏览器浏览WebApp弹出的键盘遮盖住文本框的解决办法 最近碰到Android微信内置浏览H5页面,因为其中的文本输入框(input)放置在靠近页面的中下方,点击文本框以后,则输入框会被弹出的手机输入法键盘遮盖住。 找到一段js代码直接解决之,点击时强制滚动之,好像也解决了在Android浏览器 阅读全文
posted @ 2017-01-06 15:21 夏天的冰淇淋 阅读(985) 评论(0) 推荐(0) 编辑
摘要: 根据当前所处位置 定位所在城市信息 2、html5 geolocation 定位( 获取当前经纬度 ): 阅读全文
posted @ 2017-01-05 16:00 夏天的冰淇淋 阅读(700) 评论(0) 推荐(0) 编辑
摘要: 网页可见区域宽:document.body.clientWidth 网页可见区域高:document.body.clientHeight 网页可见区域宽:document.body.offsetWidth (包括边线的宽) 网页可见区域高:document.body.offsetHeight (包括 阅读全文
posted @ 2016-11-25 14:47 夏天的冰淇淋 阅读(490) 评论(0) 推荐(0) 编辑
摘要: 1 document.body.clientWidth ==> BODY对象宽度 2 document.body.clientHeight ==> BODY对象高度 3 document.documentElement.clientWidth ==> 可见区域宽度 4 document.documentElement.clientHeight ==> 可见区域高度 5 ... 阅读全文
posted @ 2016-11-01 13:18 夏天的冰淇淋 阅读(5666) 评论(0) 推荐(0) 编辑