引入js script src="https://cdn.bootcdn.net/ajax/libs/mobile-detect/1.4.5/mobile-detect.min.js"/script 使用 var md = new MobileDetect ( window . navigator . userAgent ); var a = md . mobile (); var b = md . os (); var c = md . userAgent
引入js
<script src="https://cdn.bootcdn.net/ajax/libs/mobile-detect/1.4.5/mobile-detect.min.js"></script>使用
var md = new MobileDetect(window.navigator.userAgent);var a = md.mobile();
var b = md.os();
var c = md.userAgent();
详见 mobile-detect 中文网 https://www.mobile-detect.cn/
CND: https://www.bootcdn.cn/mobile-detect/