js 检测不同设备
/*是否是android*/functionisAndroid(){varuserAgent=window.navigator.userAgent;if(/android/i.test(userAgent)){returntrue;}returnfalse;};/*是否是IOS*/functionisIOS(){varuserAgent=window.navigator.userAgent;if(/iphone|ipad|ipod/i.test(userAgent)){returntrue;}returnfalse;};/*是否是微信*/functionisWeiXin(){varuserAgent=window.navigator.userAgent;if(/micromessenger/i.test(userAgent)){returntrue;}returnfalse;}
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。