var value1 = ['http://xxxx:8002/','http://xxxxx:8002/','http://xxxxx:8002/'];
var value2 = ['http://xxxxxx:8002/','http://xxxxxx:8002/','http://xxxxx:8002/'];
var value3 = ['http://xxxxxx:8002/','http://xxxxxx:8002/'];
(function() {
if (window.location.hostname == 'xxxxx') {
var num=pickUp(value1);
window.location.href= num + window.location.hash
}
if (window.location.hostname == 'xxxxxxx') {
var num=pickUp(value2);
window.location.href= num + window.location.hash
}
if (window.location.hostname == 'xxxxxx') {
var num=pickUp(value3);
window.location.href= num + window.location.hash
}
})();
//获取随机域名
function pickUp(values) {
var index=randomNumber(0,values.length-1);
return values[index];
}
function randomNumber(lowIndex,highIndex) {
return Math.floor(Math.random() * (highIndex-lowIndex+1) + lowIndex);
}