//获取域名方法 getHost() = "http://localhost:8080"
this.getHost = function(){
var host = location.protocol.toLowerCase()+"//"+location.hostname;
if(location.port != '' && location.port != '80'){
host = host + ":" + location.port;
}
return host;
}