--解析UserAgent,获取移动设备访问的系统版本和设备型号 function getUAField(t) local separator=';' local tab={} local android=string.find(t,"Android") local iphone=string.find(t,"iPhone") if android then tab["platform"
我有以下代码读取userAgent并根据使用indexOf匹配的值执行一些逻辑: String userAgent;
userAgent = Request.UserAgent;
// If it's not IE
if (userAgent.IndexOf("MSIE") < 0)
{
return RedirectToAction("Index", "Home", new { area