📅  最后修改于: 2022-03-11 15:02:35.330000             🧑  作者: Mango
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);