1.掌握Navigator对象的userAgent属性
2.掌握如何判断浏览器的类型
3.掌握如何判断设备的终端是移动还是PC UserAgent:用来识别浏览器名称,版本,引擎以及操作系统等信息的内容。
//检测浏览器类型if(/Android|iphone|webOS/i.test(navigator.userAgent)){location.href="mobile.html"}else if(/ipad/i.test(navigator.userAgent)){location.href="pad.html"}
