This feature is mainly used on the mobile phone, if the phone does not have the app installed, then jump to the download page, otherwise, directly open the app in the phone.
<Divstyle= "position:absolute; top:84%; left:24%; z-index:8;"><aID= "J-call-app"href= "javascript:;"><imgsrc= "Image/but01.jpg"></a><inputID= "J-download-app"type= "hidden"name= "Storeurl"value= "http://app.jiaxidezhou.com/jxmj.apk"></Div>
<script>//JS opens the application directly via the browser (ios,android)(function(){varUA =navigator.userAgent.toLowerCase ();varT;varConfig = {/*scheme: Must*/Scheme_ios:' jiaximajiang://', Scheme_adr:' Jiaximajiang://splash ', Download_url:document.getElementById (' J-download-app '). Value,timeout:600};functionopenclient () {varStartTime =Date.now ();varIFR = document.createelement (' iframe '); Ifr.src= Ua.indexof (' os ') > 0?Config.scheme_ios:config.scheme_adr;ifr.style.display= ' None ';d Ocument.body.appendChild (IFR);vart = setTimeout (function() {varEndTime =Date.now ();if(!starttime | | Endtime-starttime < CONFIG.TIMEOUT + 200) {window.location=Config.download_url;} Else{}}, config.timeout); Window.onblur=function() {cleartimeout (t);}} Window.addeventlistener ("Domcontentloaded",function() {document.getElementById ("J-call-app"). AddEventListener (' Click ', Openclient,false);}, false);}) ()//JS judgment, QQ built-in browser, useragentWindow.onload =function (){varUA =navigator.userAgent.toLowerCase ();vardiv = document.getElementById ("Here");if(Ua.match (/micromessenger/i) = = ' Micromessenger ' | | ua.match (/qq\//i) = = "qq/") {Div.style.display= "Block";}Else{Div.style.display= "None";}}</script>
[Reference]http://blog.csdn.net/coslay/article/details/46889051#t1
JS opens the application directly via the browser (ios,android) and determines the browser kernel