<#--判断是哪种登录方式-->
var agent = navigator.userAgent.toLowerCase();
var res = agent.match(/android/);
if(res == "android"){
alert("android");
}
res = agent.match(/iphone/);
if(res == "iphone"){
alert("ios");
}
res = agent.match(/ipad/);
if(res == "ipad"){
alert("ipad");
}
res = agent.match(/windows/);
if(res == "windows"){
alert("wp");
}
使用java代码判断用户使用哪种方式登录的。
最新推荐文章于 2024-09-05 21:22:29 发布
本文提供了一个JavaScript代码片段,用于识别用户的登录设备类型,包括Android、iOS、iPad和Windows Phone。
6243

被折叠的 条评论
为什么被折叠?



