<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> </head> <body> <script> function isMobile() { if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) return true; else return false; }</script> </body> </html>
js判断是移动端还是pc端