Can code in a Javascript file know its own domain/URL

后端 未结 2 650
萌比男神i
萌比男神i 2020-12-16 12:35

If I have a site, example.com, and a page on that site references a Javascript at subdomain.example.com/serveAd.js -- is there a way from within serveAd.js to know its own U

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-16 12:54

    I'm pretty sure, as the script is parsed that the last

提交回复
热议问题