我需要添加一个表单到一个网站上的网页,这需要从查看者的域名作为输入,并将其发送到who.is,以便为这个域名的域名系统返回。
在搜索onwho.is时,查找me.com时搜索查询的URL如下所示:
http://who.is/dns/me.com
我在这里苦苦挣扎,因为我不能使用变量形式传递域名,使用?q=...
有什么想法吗?
这就是到目前为止我所拥有的这个表单的html:
<form method="get" action="http://who.is/dns/" target="_blank">
<input type="text" name="q" size="31" maxlength="255" placeholder="Who is" width="255"/>
</form>谢谢
发布于 2014-10-22 16:25:29
你将无法在超文本标记语言中做到这一点,除非你找到一个带参数的URL,比如TechnoKnol posted。
您需要此进程或服务器进程
window.onload=function() {
document.getElementById("who").onsubmit=function() {
window.open("http://who.is/dns/"+document.getElementById("q").value(),"_blank");
return false;
}
}使用
<form id="who">
<input type="text" id="q" size="31" maxlength="255" placeholder="Who is" width="255"/>
</form>发布于 2014-10-22 16:25:53
通过在who.is上查看,我找到了以下url
http://who.is/search.php?search_type=Whois&query=me.com&commit=Search在你的表单中做一些修改就可以了。
https://stackoverflow.com/questions/26503087
复制相似问题