<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>樂樂微店</TITLE>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18702"></HEAD>
<BODY
<META name=viewport
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
樂樂微店 <A style="DISPLAY: none" id=openApp >下載樂樂微店</A>
<SCRIPT type=text/javascript>
//ios判斷
if (navigator.userAgent.match(/(iPhone|iPod|iPad);?/i)) {
// 判斷useragent,當前設(shè)備為ios設(shè)備
var loadDateTime = new Date();
// 設(shè)置時間閾值,在規(guī)定時間里面沒有打開對應(yīng)App的話,直接去App store進行下載。
window.setTimeout(function() {
var timeOutDateTime = new Date();
if (timeOutDateTime - loadDateTime < 5000) {
window.location = "https://itunes.apple.com/cn/app/hu-lu/id627370076?mt=8";
} else {
window.close();
}
},
25);
window.location = "lelewd://platformapi/startApp?name=tom&age=18";//"XXXX://XXXX"; // Android端URL Schema
}
//判斷是否是android設(shè)備瀏覽器
else if (navigator.userAgent.match(/android/i)) {
document.getElementById("openApp").onclick = function(e) {
// 通過iframe的方式試圖打開APP,如果能正常打開,會直接切換到APP,并自動阻止a標簽的默認行為
// 否則打開a標簽的href鏈接
var ifrSrc = "lelewd://platformapi/startApp?name=tom&age=18";
if (!ifrSrc) {
return;
}
var ifr = document.createElement("iframe");
ifr.src = ifrSrc;
ifr.style.display = "none";
document.body.appendChild(ifr);
setTimeout(function() {
document.body.removeChild(ifr);
}, 1000);
};
if (document.all) {
document.getElementById("openApp").click();
}
// 其它瀏覽器
else {
var e = document.createEvent("MouseEvents");
e.initEvent("click", true, true);
document.getElementById("openApp").dispatchEvent(e);
}
}
</SCRIPT>
</BODY></HTML>
本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請
點擊舉報。