Answers for "pegar qual domínio eu estou javascript"

0

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);
Posted by: Guest on May-15-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language