- /*">
- <script>
- /*
- * 识别是否为PC
- */
- function is_pc(){
- var os = new Array("Android","iPhone","Windows Phone","iPod","BlackBerry","MeeGo","SymbianOS"); // 其他类型的移动操作系统类型,自行添加
- var info = navigator.userAgent;
- var len = os.length;
- for (var i = 0; i < len; i++) {
- if (info.indexOf(os[i]) > 0){
- return false;
- }
- }
- return true;
- }
- </script>
- //该片段来自于http://www.codesnippet.cn/detail/301020136797.html
来源: http://www.codesnippet.cn/detail/301020136797.html