<%@ Import NameSpace="System.Net" %>
<script language="C#" runat=server>
protected void doClick(Object Src, EventArgs E){
IPHostEntry hostInfo = DNS.GetHostByAddr(txtIP.Text);
showmsg.Text=hostInfo.Hostname;
}
</script>
<asp:Label runat=server id=showmsg />
<form id=testForm runat=server>
要查找的IP地址:<asp:TextBox runat=server id=txtIP /><asp:Button runat=server id=do Text="查找" onClick=doClick />
</form>
时间: 2024-09-29 05:10:34