Get The Current Domain Name With Javascript (Not the path, etc.)

前端 未结 17 2253
情歌与酒
情歌与酒 2020-12-04 05:43

I plan on buying two domain names for the same site. Depending on which domain is used I plan on providing slightly different data on the page. Is there a way for me to de

17条回答
  •  悲哀的现实
    2020-12-04 06:07

           Feel free to visit our “Contact” link
    

    Indeed worked for me whereas I couldn't use PHP

    Just tested that it worked thanks to the approach mentioned above in some of the answers, so quick and verified that worked

提交回复
热议问题