目的:静态网页列表中选择网页名,然后打开该静态网页。现在,需要2两个步骤:
1. 选择“文件名”,使用“确定”按钮提交“文件名”:
wb.AddForm("page1","form2","qar2d.htm")
With wb.AddInputGroup("form2","ipg2","2D动画")
.AddSelect("filename","动画","|" & DataTables("动画汇总").GetComboListString("文件名")) '例如选择文件名acs
End With
With wb.AddButtonGroup("form2","btg2",True)
.Add("btn2", "确定", "submit") '提交文件名“acs”
End With
此主题相关图片如下:选择页面.png
2.跳转到网页qar2d.htm,通过“重新筛选”按钮和合成网页名,打开所选择网页,
Case "qar2d.htm"
Dim flt As String = e.PostValues("filename") & ".html" '合成网页名=选择文件名+.html,例如:acs.html
With wb.AddButtonGroup("","btg1",True)
.Add("btn1", "重新筛选", "",flt) 打开所选择网页acs.html
End With
此主题相关图片如下:重新筛选.png
能否简化代码,合并成一个步骤,获取所选择的文件名,直接通过“确定”按钮实现打开所选网页,谢谢!
[此贴子已经被作者于2019/7/22 10:05:56编辑过]