JS代码判断手机访问2

 // if the modile device, redict to the modile page

var userAgentInfo = navigator.userAgent.toLowerCase();

var murl = "${pageContext.request.contextPath}/NewFile.html" ;

 if ((userAgentInfo.match(/(iphone|ipod|android|ipad)/i))) {

                     location.replace(murl);

                     return ;

             }

猜你喜欢

转载自endual.iteye.com/blog/1787616
今日推荐