现在想实现 浏览器访问网站,判断是否安装APP,安装了直接打开,
d && ( $('#'+b).attr("href", android_down_url),
document.getElementById(b).onclick = function() {
var a = document.createElement("iframe");
a.src = app_open_url;
a.style.display = "none";
document.body.appendChild(a),
a.onload = function(){
alert('hello world');
}
window.setTimeout(function() {
document.body.removeChild(a)
}, 100);
} );
同样的代码在IOS默认浏览器可以,android就不行
同样是手机,为什么要用两套系统?so,你要看浏览器的支持是得当,比如知乎的网页,android chrome中就可以打开知乎客户端,但是在火狐中就不行