以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  网页按钮BUG  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=125964)

--  作者:nblwar
--  发布时间:2018/10/10 16:32:00
--  网页按钮BUG
        \'生成换页按钮
        With wb.AddButtonGroup("", "btg1", False)
            With .Add("btnFirst", "首页", "button", "pdjl.htm?all=" & all & "&page=0")
                If page <= 0 Then
                    .Kind = 1
                    .Enabled = False
                End If
            End With

这样生成的按钮,还是可以点击并触发

--  作者:有点甜
--  发布时间:2018/10/10 16:48:00
--  

换一种思路

 


Select Case e.Path
    Case "test.htm", ""
        Dim wb As New WeUI
        With wb.AddTable("","Table1")
            .CreateFromDataTable(DataTables("表A"))
        End With
        With wb.AddButtonGroup("", "btg1", False)
            With .Add("btnFirst", "首页", "button")
                If 1=1 Then
                    .Attribute = ""
                    .Kind = 1
                    .Enabled = False
                Else
                    .Attribute = "onclick = ""location=\'http://www.baidu.com\'"""
                    .Kind = 1
                    .Enabled = True
                End If
            End With
        End With
        e.WriteString(wb.Build)
End Select