jquery, domain, get URL

前端 未结 11 2096
滥情空心
滥情空心 2020-12-12 10:04

How can I get the domain name with jquery ??

11条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-12 10:58

    check this

    alert(window.location.hostname);

    this will return host name as www.domain.com

提交回复
热议问题