jquery, domain, get URL

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

How can I get the domain name with jquery ??

11条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-12 10:42

    document.baseURI gives you the domain + port. It's used if an image tag uses a relative instead of an absolute path. Probably already solved, but it might be useful for other guys.

提交回复
热议问题