With wb.AddInputGroup("page1","ig1")
With .AddInputCell("inputbtn") '通过InputCell增加输入框
With .AddInput("chaxunintput","text",1) '增加输入框,1表示显示在中间
If filter > "" Then
.Value = filter
End If
End With
.AddVcodeButton("vcodebtn","查询",2).Attribute=" & pgname & "',1)"""
End With
With .AddInputCell("ic3",1) '通过InputCell增加输入框, 2表示突出显示(含图标)
With .AddInput("riqi1","date",0) '增加输入框,1表示显示在中间
If riqi1 > "" Then
.Value = riqi1
End If
End With
With .AddInput("riqi2","date",1) '增加输入框,1表示显示在中间
If riqi2 > "" Then
.Value = riqi2
End If
End With
End With
End With
另外,我即使在第一个input框输入了日期,js也不能读取到日期框里的内容。但是pc端测试却没有任何问题,真是奇怪!
js代码如下:
function showFilterLists(pgname,ye) {
var vcodeBtn = document.getElementById("vcodebtn");
var filter = document.getElementById("chaxunintput").value;
var riqi1 = document.getElementById("riqi1").value;
var riqi2 = document.getElementById("riqi2").value;
var url = "Lists.htm?page=" + pgname + "&ye=" + ye;
if(filter){
url = url + "&filter="+filter;
}
if(riqi1){
url = url + "&riqi1="+riqi1;
}
if(riqi2){
url = url + "&riqi2="+riqi2;
}
vcodeBtn.href = url;
}