function setCodes(){
var result= submitAjaxFileds('getCodes.htm','','areacode',false);
if(result){
var vals=result.split("|");
var html = "";
for (var i = 0; i < vals.length; i++){
html = html + "<label class='weui_cell weui_check_label' for='bw" + i + "'><div class='weui_cell_hd'><input type='checkbox' class='weui_check' name='bw" + i + "' id='bw" + i + "'/>";
html = html+ "<i class='weui_icon_checked'></i></div><div class='weui_cell_bd weui_cell_primary'><p>" + vals[i] + "</p></div></label>";
}
//alert(html);
document.getElementById("rdg1").innerHTML = html;
}
}
Dim fl As String = "d:\web\" & e.path
If filesys.FileExists(fl)
Dim idx As Integer = fl.LastIndexOf(".")
Dim ext As String = fl.SubString(idx)
Select Case ext
Case ".jpg",".gif",".png",".bmp",".wmf",".js",".css" ,".html",".htm",".zip",".rar"
e.WriteFile(fl)
Return '这里必须返回
End Select
End If
Select Case e.Path
Case "test.htm"
Dim wb As New weui
wb.AppendHTML("<script src='./lib/ajaxform.js'></script>")
wb.AddForm("","form1","test.htm")
With wb.AddInputGroup("form1","ipg1","自动输入")
.AddInput("areacode","区号","text")
.AddInput("postcode","邮编","text")
End With
With wb.AddCheckGroup("form1","rdg1","浏览器")
.Add("bw1","Intenet Explorer", True) '默认勾选
.Add("bw2","Google Chorme")
.Add("bm3","FireFox")
.Add("bm4","Safari").Enabled = False '此项不可选
End With
With wb.AddButtonGroup("form1","btg1",True)
.Add("btn1", "确定", "button").Attribute = "onclick='setCodes()'"
End With
e.WriteString(wb.Build) '生成网页
Case "getCodes.htm" '根据输入的省和县,获取区号有邮编
e.WriteString("项目1|项目2|项目3")
End Select