文档标题
//
function open_or_download_app() {
var device = document.getElementById("device");
if (navigator.userAgent.match(/(iPhone|iPod|iPad);?/i)) {
// 判断useragent,当前设备为ios设备
var loadDateTime = new Date();
// 设置时间阈值,在规定时间里面没有打开对应App的话,直接去App store进行下载。
window.setTimeout(function() {
var timeOutDateTime = new Date();
if (timeOutDateTime - loadDateTime