- ·上一篇文章:Vue调试神器vue-devtools安装
- ·下一篇文章:使用 webpack 引用 zepto
当前位置:K88软件开发 → 文章中心 → 编程语言 → JavaScript → JS01 → 文章内容
网页自动跳转唤醒支付宝app领取红包方法
-->
代码分享如下(效果预览:alipay.k88.net)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | <html lang="en" class="mdl-js"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="description" content="A front-end template that helps you build fast, modern mobile web apps."> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0"> <title>正在打开支付宝</title> <!-- Add to homescreen --> <link rel="manifest" href="manifest.json"> <!-- Fallback to homescreen for Chrome <39 on Android --> <meta name="mobile-web-app-capable" content="yes"> <meta name="application-name" content="Material Design Lite"> <!-- Add to homescreen for Safari on iOS --> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta name="apple-mobile-web-app-title" content="Material Design Lite"> <!-- TODO: Tile icon for Win8 (144x144 + tile color) --> <!-- <meta name="msapplication-TileImage" content="images/touch/ms-touch-icon-144x144-precomposed.png"> --> <!-- <meta name="msapplication-TileColor" content="#3372DF"> --> <meta name="theme-color" content="#024f73"> <!-- SEO: If your mobile URL is different from the desktop URL, add a canonical link to the desktop page https://developers.google.com/webmasters/smartphone-sites/feature-phones --> <!-- <link rel="canonical" href="http://www.example.com/"> --> <!-- <link rel="stylesheet" href="material.min.css"> --> <!-- <script defer src="material.min.js"></script> --> <!-- Fonts --> </head> <style> body { width: 100%; min-height: 100%; margin: 0; } html, body { font-family: "Helvetica","Arial",sans-serif; font-size: 14px; font-weight: 400; line-height: 20px; } #biao1{ color:#019fe8; } #gogo{ height: 100%; width: 100%; background:url("alipay.jpg"); background-size:cover; height: 100%; } .mdl-button{ padding: 0px; } </style> <body aligh="center" onclick="copyUrl2()"> <!--自动跳转支付宝--> <a id="gogo" href="alipays://platformapi/startapp?saId=10000007&clientVersion=3.7.0.0718&qrcode=https://qr.alipay.com/c1x082376gv0wk5nduyqb4b" class="mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect"> <div cols="20" id="biao1">支付宝发红包啦!即日起还有机会额外获得余额宝消费红包!长按复制此消息,打开最新版支付宝就能领取!Zdxxq699LY</div> </a> <div align="center"> <script src="https://open.mobile.qq.com/sdk/qqapi.js?_bid=152"></script> <script> window.onhashchange = function() { document.getElementById("gogo").click(); }; function hh() { document.getElementById("gogo").click(); mqq.ui.openUrl({ target: 2, url: "alipays://platformapi/startapp?saId=10000007&clientVersion=3.7.0.0718&qrcode=https://qr.alipay.com/c1x082376gv0wk5nduyqb4b" }); }; setTimeout('hh();', 500); </script> <!--自动跳转支付宝--> </div> <script src="http://upcdn.b0.upaiyun.com/libs/jquery/jquery-2.0.2.min.js"> </script> <script type="text/javascript"> //点击页面自动复制功能 function copyUrl2() { var Url2=document.getElementById("biao1").innerText; var oInput = document.createElement('input'); oInput.value = Url2; document.body.appendChild(oInput); oInput.select(); // 选择对象 document.execCommand("Copy"); // 执行浏览器复制命令 oInput.className = 'oInput'; oInput.style.display='none'; } </script> </body> </html> |
网页自动跳转唤醒支付宝app领取红包方法