标签:android style class blog code java
腾讯的适配代码 ,比较权威 ,果断盗用!
<script type="text/javascript"> if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){ if(window.location.href.indexOf("?mobile")<0){ try{ if(/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){ window.location.href="http://shipei.qq.com/index.htm"; }else if(/iPad/i.test(navigator.userAgent)){ }else{ window.location.href="http://shipei.qq.com/simple/s/index/" } }catch(e){} } } </script>
标签:android style class blog code java
原文地址:http://www.cnblogs.com/mjorcen/p/3782464.html