js scheme 打开手机app的方法
时间:2020-11-01 20:38:21
收藏:0
阅读:39
function schemeUrl(url,callbak){ var ifr = document.createElement("iframe"); ifr.src = url; /***打开app的协议,如zhe800://goto_home***/ ifr.style.display = "none"; document.body.appendChild(ifr); //app没反应1s后执行另外的方法 window.setTimeout(function(){ document.body.removeChild(ifr); if(typeof callbak == ‘function‘){callbak();} },1000)};
评论(0)