![]() | 1 Showfom PRO six |
2 kacong 2017-07-11 02:50:27 +08:00 smart bookmark. |
![]() | 3 lslqtz 2017-07-11 03:19:16 +08:00 Uncaught TypeError: Failed to construct 'XMLHttpRequest': Please use the 'new' operator, this DOM object constructor cannot be called as a function. |
![]() | 4 lslqtz 2017-07-11 03:22:57 +08:00 Javascript:x=new XMLHttpRequest();x.open("get","https://dns.google.com/resolve?name="+document.domain,false);x.send();alert(JSON.parse(x.responseText).Answer.pop().data); 改了个查当前域名的。 |
![]() | 6 autoxbc 2017-07-11 03:49:55 +08:00 挺好。不过现在满世界 CDN,查出来的都不是本地最佳镜像,我直接在路由上架了个查询服务。 |
![]() | 8 crystone 2017-07-11 09:31:00 +08:00 怎么使用呢 |
![]() | 9 autoxbc 2017-07-11 15:20:06 +08:00 @shadownet 和楼主这个差不多,只是不走 google 的查询,在路由查询并返回,cgi 脚本是这样的 https://gist.github.com/anonymous/febfaa031558684014006da335ec2f0b 用 Web Server 的 cgi 模式运行,不能是 fast-cgi。 然后就是浏览器调用,就是上面这种小书签脚本。我用浏览器本身的私有方法跨域,所以 Web Server 里没有再设置允许跨域的 header。 |