欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

js 得到主机名

shiping1 的头像
<script
        var str=window.location.host;
		
		if(str.indexOf('aaaa.com')>-1 ){document.getElementById('banquanshouyouBjxyd').innerHTML='版有:北京  '};
		if(str.indexOf('bbbb.com')>-1){document.getElementById('banquanshouyouBjxyd').innerHTML='版有:上海'};
</script> 
  
普通分类: