跪求大神帮我这段代码增加一下判断安卓手机访问执行js苹果不执行,拜托了
<script language="javascript">function dogo(){
var urls = new Array();
urls="http://www.baidu.com";
urls="http://www.52pojie.cn";
urls="http://www.qq.com";
urls="http://www.360.com";
urls="http://www.sogou.com";
n = Math.floor(Math.random()*5);
location.href= urls;
}
</script>
<body>
</body>
var ua = navigator.userAgent.toLowerCase();
if(ua.indexOf('android') > -1 || ua.indexOf('linux') > -1){
// code
}
页:
[1]