<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>正在跳转...</title> </head> <body> <script> var url = "myapp://xxx/"; 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 = "http://ios_downpage"; } else { window.close(); } }, 25); window.location = url; } else if (navigator.userAgent.match(/android/i)) { window.location.href = url; window.setTimeout(function () { window.location.href = "http://android_downpage"; }, 3000); } </script> </body> </html>
时间: 2024-10-09 21:29:02