快活林资源网 Design By www.csstdc.com

本文实例为大家分享了jQuery实现移动端扭蛋机抽奖的具体代码,供大家参考,具体内容如下

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="apple-touch-fullscreen" content="YES" />
<meta name="format-detection" content="telephone=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta http-equiv="Expires" content="-1" />
<meta http-equiv="pragram" content="no-cache" />
 
<link href="css/style.css" type="text/css" rel="stylesheet"/>
 
<title>扭蛋机</title>
<!--移动端版本兼容 -->
<script type="text/javascript">
 var phoneWidth = parseInt(window.screen.width);
 var phoneScale = phoneWidth/640;
 var ua = navigator.userAgent;
 if (/Android (\d+\.\d+)/.test(ua)){
 var version = parseFloat(RegExp.$1);
 // andriod 2.3
 if(version>2.3){
  document.write('<meta name="viewport" content="width=640, minimum-scale = '+phoneScale+', maximum-scale = '+phoneScale+', target-densitydpi=device-dpi">');
 // andriod 2.3以上
 }else{
  document.write('<meta name="viewport" content="width=640, target-densitydpi=device-dpi">');
 }
 // 其他系统
 } else {
 document.write('<meta name="viewport" content="width=640, user-scalable=no, target-densitydpi=device-dpi">');
 }
 //微信去掉下方刷新栏
 if(RegExp("MicroMessenger").test(navigator.userAgent)){
 document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
  WeixinJSBridge.call('hideToolbar');
 });
 }
</script>
 
 <script src="/UploadFiles/2021-04-02/jquery1.8.3.min.js">

 jQuery实现移动端扭蛋机抽奖

demo下载地址:jQuery移动端扭蛋机抽奖

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。

快活林资源网 Design By www.csstdc.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
快活林资源网 Design By www.csstdc.com