以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  移动开发中怎么指定其中行的颜色?  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=160505)

--  作者:xietan417
--  发布时间:2021/2/4 17:32:00
--  移动开发中怎么指定其中行的颜色?
Dim e As RequestEventArgs = args(0)
Dim wb As New weui
wb.AppendHTML("<style>.mark{background-color:red; color:white;}</style>", True) \'添加样式
\'订单编辑
Dim pr As DataRow \'订单
pr = DataTables("wage").SQLFind("姓名=\'xt\'")
wb.AddPageTitle("","pageheader","","(保密资料,禁止外泄)")

With wb.AddPreview("","pv1",pr("月份") & "工资实发合计:" ,"¥" & pr("工资2"))
    .AddItem("姓名",pr("姓名"))
    .AddItem("工号",pr("工号"))
    .AddItem("部门",pr("部门"))
    .AddItem("职位",pr("职位"))
End With
‘----------------------------------------------------------------------
With wb.AddPreview("","pv2","缺勤时数",".")
    .AddItem("事假",pr("事假"),"class=\'mark\'") 
    .AddItem("病假",pr("病假"),"class=\'mark\'") 
    .AddItem("有薪假",pr("有薪假"),"class=\'mark\'") 
End With
’---------------------------------------------------这个字段变色

With wb.AddPreview("","pv3","加班时数",".")
    .AddItem("平时加班",pr("平时加班"))
    .AddItem("周末加班",pr("周末加班"))
    .AddItem("节假加班",pr("节假加班"))
End With
With wb.AddPreview("","pv6","应付工资","¥" & pr("工资2"))
End With


e.WriteString(wb.Build) \'生成网页
e.Handled = True
图片点击可在新窗口打开查看此主题相关图片如下:wage.png
图片点击可在新窗口打开查看
[此贴子已经被作者于2021/2/4 17:34:18编辑过]

--  作者:有点蓝
--  发布时间:2021/2/4 17:42:00
--  
.AddItem("项目2","内容2","style=\'background-color:gray;color:red\'")
--  作者:xietan417
--  发布时间:2021/2/4 17:46:00
--  
收到,谢谢蓝版