<script type="text/javascript">
var userAgent = navigator.userAgent.toLowerCase();
var platform;
if(userAgent == null || userAgent == ''){
platform = 'WEB' ;
}else{
if(userAgent.indexOf("android") != -1 ){
platform = 'ANDROID';
location.href = "http://www.diqiujiayuan.com/m/";
}else if(userAgent.indexOf("ios") != -1 || userAgent.indexOf("iphone") != -1 || userAgent.indexOf("ipad") != -1){
platform = 'IOS';
location.href = "http://www.diqiujiayuan.com/m/";
}else if(userAgent.indexOf("windows phone") != -1 ){
platform = 'WP';
location.href = "http://www.diqiujiayuan.com/m/";
}else{
platform = 'WEB' ;
location.href = "http://www.diqiujiayuan.com/";
}
}
</script>
转载于:https://my.oschina.net/docin/blog/201573