帮助中关于submitAjaxFileds函数示例
function setCodes(){
var result=
submitAjaxFileds('getCodes.htm','','province','county',false);
if(result){
var vals=result.split("|");
if(vals.length==2){
document.getElementById("areacode").value=vals[0];
document.getElementById("postcode").value=vals[1];
}
}
}
Select
Case e.Path
Case
"test.htm"
Dim wb As New weui
wb.AddForm("","form1","test.htm")
With wb.AddInputGroup("form1","ipg1","自动输入")
With .AddSelect("province","省市","|"+DataTables("行政区域").GetComboListString("省市"))
.Attribute = "onchange""setAjaxOptions('county','getCounties.htm','province',false)"""
End
With
With .AddSelect("county","县","")
.Attribute = "onchange='setCodes()'"
'调用js函数
End
With
.AddInput("areacode","区号","text")
.AddInput("postcode","邮编","text")
End
With
With wb.AddButtonGroup("form1","btg1",True)
.Add("btn1", "确定", "submit")
End
With
wb.AppendHTML("<script
src='./lib/ajaxform.js'></script>") '引入脚本文件
e.WriteString(wb.Build) '生成网页
Case "getCounties.htm"
'根据输入的省,获取县市列表
Dim pps As
String = DataTables("行政区域").GetComboListString("县市","省市='" &
e.Values("province")
& "'")
e.WriteString("|"
& pps)
Case
"getCodes.htm"
'根据输入的省和县,获取区号有邮编
Dim dr As
DataRow =
DataTables("行政区域").Find("省市='" &
e.Values("province")
& "' and
县市='" &
e.values("county")
& "'")
If dr
IsNot
Nothing
Then
e.WriteString(dr("区号") & "|" & dr("邮编"))
End
If
End Select
请问如何把test.htm网页从HttpRequest中放入到函数中,拜托!!!
[此贴子已经被作者于2018/10/28 20:55:31编辑过]