84669 人学习
152542 人学习
20005 人学习
5487 人学习
7821 人学习
359900 人学习
3350 人学习
180660 人学习
48569 人学习
18603 人学习
40936 人学习
1549 人学习
1183 人学习
32909 人学习
手机端web页面,怎么判断ios是否安装了某个app?
这个问题segmentfault上有. IOS 网页能判断有没有安装应用很久没去看了. 试试:
<script language="javascript"> if (navigator.userAgent.match(/(iPhone|iPod|iPad);?/i)) { var loadDateTime = new Date(); window.setTimeout(function() { var timeOutDateTime = new Date(); if (timeOutDateTime - loadDateTime < 5000) { window.location = "要跳转的页面URL"; } else { window.close(); } }, 25); window.location = " apps custom url schemes "; } else if (navigator.userAgent.match(/android/i)) { var state = null; try { state = window.open("apps custom url schemes ", '_blank'); } catch(e) {} if (state) { window.close(); } else { window.location = "要跳转的页面URL"; } } </script>
这个问题segmentfault上有. IOS 网页能判断有没有安装应用
很久没去看了. 试试: