有没有办法弄清楚当前页面的主机名的顶级域名是什么?我遇到的问题是脚本可能在.com域中,也可能在像.co.uk这样的国际域中
所以: jobs.telegraph.co.uk - top domain is:telegraph.co.uk jobs.nytimes.com - top domain is nytimes.com
问题是location.hostname和document.domain提供了整个域。
一种方法是拥有所有TLD的列表(太多了,不能随身携带),并基于此进行解析。另一条路线是如果最后两个字符在最后一个".“之后,那么国际化-因此最后两个是TLD,但这并不适用于所
好的,我已经在A公司"MadeInHosting.com“上托管了一个域名,我已经等了72小时,然后访问了这个网站,它对我说”我们找不到这个网页“,当我切换到cpanel中的域名时,这个网站应该在这里,它会报告我这个错误:
Your domain is not pointing to our nameservers at the moment, so services such as FTP,
File Manager, Website Builder, E-mail (and others) will not work correctly. You can find
our