Dim e As RequestEventArgs = args(0)
'获取要显示的页
Dim page As Integer = 0 '默认page为0,显示第一页
Dim pageRows As Integer = 3 '每页10行
If e.GetValues.ContainsKey("page") Then '如果地址中有page参数
Integer.TryParse(e.GetValues("page"), page) '提取page参数
End If
Dim StartRow As Integer = page * pageRows + 1 '此页第一行
Dim EndRow As Integer = (page + 1) * pageRows '此页最后一行
'获取该页数据
Dim Count As Integer =DataTables("订单").SQLCompute("Count(*)", "")
Dim dt As DataTable = DataTables("订单")
Dim wb As New WeUI
With wb.AddTable("","Table1")
.PageNumber = page '设置页码
.Primarykey = "Identify" '设置主键
'' .ActiveSheet = "menu" '设置菜单
.CreateFromDataTable(dt)
End With
Dim aa As String
For Each dr As DataRow In dt.datarows
aa = aa & " or Identify='" & dr("_Identify") & "'"
Next
aa ="(" & aa.Trim("o","").Trim("r","") & ")"
messagebox.show( aa )
'根据此页数据生成网页
With wb.AddButtonGroup("","btg1" ) '生成上一页和下一页按钮
.Add("btn1","删除").Attribute =""
.Add("btn1","aa").Attribute ="""
End With
wb.AppendHTML("<script src='./lib/table.js'></script>") '引入脚本文件
e.WriteString(wb.Build)
请问一下 怎么把变量 aa 传递到js 页面?
js 代码
function del(){
alert(table1.primarykey);
if(table1.primarykey){
location="delete.htm?page=" + table1.pagenumber + "&key=" + table1.primarykey;
}
}
不选中行的情况下怎么删除当页显示的所有内容?
[此贴子已经被作者于2017/9/25 13:50:15编辑过]