以下是学习无刷新的笔记:
<script language="VBScript">
Function bytes2BSTR(vIn)
strReturn = ""
For k = 1 To LenB(vIn)
ThisCharCode = AscB(MidB(vIn,k,1))
If ThisCharCode < &H80 Then
strReturn = strReturn & Chr(ThisCharCode)
Else
NextCharCode = AscB(MidB(vIn,k+1,1))
strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
k = k + 1
End If
Next
bytes2BSTR = strReturn
End Function
</script>
<script>
function FindPlan_flag_Act(){
var xml = new ActiveXObject("Microsoft.XMLHTTP");
vurl="cust/myFindPlan_flag_Act.jsp?pricing_plan_id="+document.form1.pricing_plan_id.value;
xml.open("POST",vurl,false);//使用POST方法打开一个到服务器的连接,以异步方式通信
xml.send();//发送数据
var str="";
str =bytes2BSTR(xml.responseBody);//接收服务器返回的数据
//str 为传送回来的消息 字符串
}
</script>
//
在jsp中用 out.print(str);
<script language="VBScript">
Function bytes2BSTR(vIn)
strReturn = ""
For k = 1 To LenB(vIn)
ThisCharCode = AscB(MidB(vIn,k,1))
If ThisCharCode < &H80 Then
strReturn = strReturn & Chr(ThisCharCode)
Else
NextCharCode = AscB(MidB(vIn,k+1,1))
strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
k = k + 1
End If
Next
bytes2BSTR = strReturn
End Function
</script>
<script>
function FindPlan_flag_Act(){
var xml = new ActiveXObject("Microsoft.XMLHTTP");
vurl="cust/myFindPlan_flag_Act.jsp?pricing_plan_id="+document.form1.pricing_plan_id.value;
xml.open("POST",vurl,false);//使用POST方法打开一个到服务器的连接,以异步方式通信
xml.send();//发送数据
var str="";
str =bytes2BSTR(xml.responseBody);//接收服务器返回的数据
//str 为传送回来的消息 字符串
}
</script>
//
在jsp中用 out.print(str);