1 <script>//PC跳YD 2 var browser={ 3 versions:function(){ 4 var u = navigator.userAgent, app = navigator.appVersion; 5 return { 6 mobile: !!u.match(/AppleWebKit.*Mobile/) || !!u.match(/Windows Phone/) || !!u.match(/Android/) || !!u.match(/MQQBrowser/) 7 }; 8 }() 9 } 10 if(browser.versions.mobile) { 11 var qustr = location.pathname; 12 location.replace("//m.hnmsgf.com"+qustr); 13 } 14 </script> 15 16 17 18 <script>//YD跳PC 19 var browser={ 20 versions:function(){ 21 var u = navigator.userAgent, app = navigator.appVersion; 22 return { 23 mobile: !!u.match(/AppleWebKit.*Mobile/) || !!u.match(/Windows Phone/) || !!u.match(/Android/) || !!u.match(/MQQBrowser/) 24 }; 25 }() 26 } 27 if(!browser.versions.mobile) { 28 var qustr = location.pathname; 29 location.replace("//www.hnmsgf.com"+qustr); 30 } 31 </script>