我有这个代码用于隐藏 aspx 中的表格和单元格,后端 vb.net。代码 -
For Each row As HtmlTableRow In tab_a1.Rows
If row.ID = "a1" Then
For Each cell As HtmlTableCell In row.Cells
cell.Visible = (cell.ID = "a1")
Next
ElseIf row.ID = "b1" Then
For Each cell As HtmlTableCell In row.Cells
cell.Visible = (cell.ID = "b1")
Next
Else
row.Visible = False
End If
Next
现在我使用<div>
标签而不是表格。如何使用类似的代码并使 div 可见和不可见?