js 怎么用useragent判断为手机

js 怎么用useragent判断为手机

手机的浏览器的userAgent基本上都含有Mobile字符串,一般可以通过该字符串判断是否为手机,如navigator.userAgent.indexOf('Mobile') &gt01、首先首先,在网页中定义
JavaScript150