一个不用刷新就能提交并返回的信息vbscript
<script language="VBScript">
Function bytes2BSTR(vIn)
strReturn = ""
For i = 1 To LenB(vIn)
ThisCharCode = AscB(MidB(vIn,i,1))
If ThisCharCode < &H80 Then
strReturn = strReturn & Chr(ThisCharCode)
Else
NextCharCode = AscB(MidB(vIn,i+1,1))
strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
i = i + 1
End If
Next
bytes2BSTR = strReturn
End Function
Function CheckUser()
dim XmlHttp
set XmlHttp = CreateObject("Microsoft.XMLHTTP")
XmlHttp.Open "GET", "bb.asp?username="&document.Form1.username.value, false
XmlHttp.setRequestHeader "Content-Type","text/XML"
XmlHttp.Send
dim html
html = bytes2BSTR(XmlHttp.responseBody)
msgbox html
End Function
</script>
<input type="text" name="username" class=input style="width:120px;"><input type="button" value="检测用户" style="font-size:12px;" onClick="CheckUser()">