Dim txt As String
Dim wb As New WeUI
wb.AddPageTitle("","pt1",_xitongname,"用户工单")
wb.AddForm("","form1","yonghugongdanjieguo.htm")
Dim pps As List(of String) = DataTables("基础信息").GetValues("一类","名称 = '品牌种类'","排序")
With wb.AddInputGroup("form1","ig1","基本信息")
.AddSelect("产品品牌","产品品牌","|" & String.Join("|",pps.ToArray)).Attribute = "" ""
.AddSelect("产品种类","产品种类","")
End With
'wb.InsertHTML("<style>#ig1{font-family:'微软雅黑';font-size:25px}</style>") '设置字体
wb.InsertHTML("<div style='height:100px'></div>")
wb.AddPage("form1","page1").Attribute = "style='position: fixed;bottom: 0;right: 0;left: 0'"
With wb.AddButtonGroup("page1","btg1", False)
.Add("btn1", "确定上报","submit").Attribute = "" "" ‘不显示的,就是单击时间调用下面的函数
End With
'给产品种类
For Each pp As String In pps
'插入一些隐藏段落,用于存储各个国家的汽车品牌
wb.InsertHTML("<p hidden id='" & pp & "'>" & DataTables("基础信息").GetComboListString("二类","名称 = '品牌种类' and 一类 = '" & pp & "'","排序") & "</p>")
Next
wb.AppendHTML("<script src='./lib/chanpin.js'></script>") '引入脚本文件 品牌种类
wb.AppendHTML("<script src='./lib/kongzhi.js'></script>") '引入脚本文件 空值判断
e.WriteString(wb.Build)
function getyonghugongdan() {
var txt = document.getElementById("产品品牌").value;
if (txt == "") {
alert("产品品牌不能为空");
}
}
有两个问题,一个是提示框有域名体验不好
另一个是如果为空不知怎么中止转到下一界面,如果为空是不做任何操作的需要再当前页面继续录入数据
[此贴子已经被作者于2019/3/8 1:20:23编辑过]