摘要: /* 函数名称:checkMobile() 功 能:检查输入手机号码是否正确 参 数:s格式字符串 返回结果:正确true/错误false */ function checkMobile(s){ if(!(/^1[3|4|5|8][0-9]\d{4,8}$/.test(s))){ // alert( 阅读全文
posted @ 2018-08-30 23:15 美滋滋的胖虎 阅读(84) 评论(0) 推荐(0) 编辑
摘要: <!-- 姓名 --> <input class="name" type="text" onkeyup="value=value.replace(/[^\a-\z\A-\Z\u4E00-\u9FA5]/g,'')" onbeforepaste="clipboardData.setData('text 阅读全文
posted @ 2018-08-30 23:12 美滋滋的胖虎 阅读(589) 评论(0) 推荐(0) 编辑
摘要: /*触摸屏幕时间事件(需要先引入JQ插件)*/ $.fn.extend({ mctap:function(func){ var _this=this; this.on('touchstart',function(e){ tiptimer=new Date(); }).on('touchend',fu 阅读全文
posted @ 2018-08-30 22:57 美滋滋的胖虎 阅读(475) 评论(0) 推荐(0) 编辑
摘要: 将二维码图片,放到一张比二维码大的透明图片上,再将图片导出来 阅读全文
posted @ 2018-08-30 22:08 美滋滋的胖虎 阅读(621) 评论(0) 推荐(0) 编辑
摘要: function querymedia(){ var _mediatype=location.pathname.match(/miniwap(\w*)\//)[1]; _mediatype=_mediatype==''?0:_mediatype; return _mediatype;} 阅读全文
posted @ 2018-08-30 22:05 美滋滋的胖虎 阅读(190) 评论(0) 推荐(0) 编辑
摘要: //开始写css之前先清除页面样式 *{margin: 0px;padding: 0px;} //@media screen判断屏幕宽高适应不同分辨率 @media screen and (max-height:900px){ xxx{top:70.6%;}} //@font-face引入文字 { 阅读全文
posted @ 2018-08-30 22:00 美滋滋的胖虎 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 注意添加到head标签内 <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>// 先引入官方文件 <script> wx.config({ debug: true, // 开启调试模式,调用的所有api的返回值会 阅读全文
posted @ 2018-08-30 21:32 美滋滋的胖虎 阅读(424) 评论(0) 推荐(0) 编辑
摘要: HTML部分: <div id="orientLayer" class="mod-orient-layer"> <div class="mod-orient-layer__content"> <i class="icon mod-orient-layer__icon-orient"></i> <di 阅读全文
posted @ 2018-08-30 21:22 美滋滋的胖虎 阅读(898) 评论(0) 推荐(0) 编辑
摘要: 注意要将代码添加到head标签内 <script> var phoneWidth = parseInt(window.screen.width); var phoneScale = phoneWidth/640; var ua = navigator.userAgent; if (/Android 阅读全文
posted @ 2018-08-30 21:17 美滋滋的胖虎 阅读(390) 评论(0) 推荐(0) 编辑
摘要: 此处以点击音乐图片sndctrl实现功能举例: HTML部分: <div class="sndctrl"> <img class="homeLoadingImg" data-src="images/a01.png"><i></i> <audio id="audio" src="media/music 阅读全文
posted @ 2018-08-30 21:09 美滋滋的胖虎 阅读(2447) 评论(0) 推荐(0) 编辑
摘要: HTML部分: <div id="loading" class="loading position"> <div class="spinner"> <div class="bounce1"></div> <div class="bounce2"></div> <div class="bounce3" 阅读全文
posted @ 2018-08-30 21:00 美滋滋的胖虎 阅读(715) 评论(0) 推荐(0) 编辑
摘要: HTML部分: <div id="loading" class="loading position"> <div class="spinner"> <div class="bounce1"></div> <div class="bounce2"></div> <div class="bounce3" 阅读全文
posted @ 2018-08-30 20:56 美滋滋的胖虎 阅读(470) 评论(0) 推荐(0) 编辑