點擊 在APP內打開觸發的事件
//在APP內打開
$(".openapp").live('click',function(){
alert(window.location.href);
var appUrl = "touzizhanapp://" + window.location.href;
window.location.href = appUrl;
});
在index.html中調試,是否獲取到對應的URL
<script>
window.handleOpenURL = function(url){
setTimeout(function(){
alert(url);
},0);
}
</script>
參考文獻:
1.https://github.com/EddyVerbruggen/Custom-URL-scheme
2.http://www.jianshu.com/p/0180e3ee8108
3.http://blog.csdn.net/lovelyelfpop/article/details/48368923