pegar qual domínio eu estou javascript code example
Example: pegar qual domínio eu estou javascript
var url = window.location.hostname; // obter o dominio
var url_splt = url.split('.')
var url_name = url_splt[url_splt.length - 2];
alert(url_name);
var url = window.location.hostname; // obter o dominio
var url_splt = url.split('.')
var url_name = url_splt[url_splt.length - 2];
alert(url_name);