js获取用户设备信息.html JS获取手机型号和系统 JS获取用户设备信息 1.1 机型信息 系统出错请稍后重试, 1.2 机型详情 系统出错请稍后重试, 1.3 网络信息 1.4 ip查询网站: 1.http://www.ip.
JS获取手机型号和系统
JS获取用户设备信息
1.1 机型信息
- 系统出错请稍后重试,
1.2 机型详情
系统出错请稍后重试,
1.3 网络信息
1.4 ip查询网站:
- 1.http://www.ip.cn/
- 2.http://ip.chinaz.com/
- 3.http://ip.taobao.com/ipSearch.php
知识点汇总.txt
/***********************************知识点汇总***************************************/
// mobile-detect.min.js的使用
//1.通过src="mobile-detect.js"引入
//2.var md = new MobileDetect(window.navigator.userAgent);
//3.console.log( md.mobile() ); // 'Sony'
// console.log( md.phone() ); // 'Sony'
// console.log( md.tablet() ); // null
// console.log( md.userAgent() ); // 'Safari'
// console.log( md.os() ); // 'AndroidOS'
// console.log( md.is('iPhone') ); // false
// console.log( md.is('bot') ); // false
// console.log( md.version('Webkit') ); // 534.3
// console.log( md.versionStr('Build') ); // '4.1.A.0.562'
// console.log( md.match('playstation|xbox') ); // false
/**************附录:针对火狐谷歌浏览器实现本机ip查看:类似cmd中的ipconfig******************/
// github地址:https://github.com/diafygi/webrtc-ips【针对业务逻辑不太常用】
//get the IP addresses associated with an account
function getIPs(callback) {
var ip_dups = {};
//compatibility for firefox and chrome
var RTCPeerConnection = window.RTCPeerConnection ||
window.mozRTCPeerConnection ||
window.webkitRTCPeerConnection;
var useWebKit = !!window.webkitRTCPeerConnection;
//bypass naive webrtc blocking using an iframe
if (!RTCPeerConnection) {
//NOTE: you need to have an iframe in the page right above the script tag
//
//
//
