试题详情

在JavaScript中,判断客户端时移动端还是PC端,需要在以下代码横线处补充的代码是() <script type="text/javascript"> var userAgentInfo = navigator. .toLowerCase(); var agents = ["android","iphone","symbianos","ipod"]; for(var i = 0; i<agents.length;i++){ if(userAgentInfo.indexOf(agents[i])>0){ return true; } return false; } </script>

AuserAgent

BappVersion

CcpuClass

DappName