高難度哦,關於checkbox在前端生成後的查找問題,謝謝大家關注
我有一個頁面,用了一個模板,在模板中用了一個checkbox(ID為foiltype1),生成客戶端代碼後如下
....
<span style="height:14px;width:40px;Z-INDEX: 107; LEFT: 561px; POSITION: absolute; TOP: 58px">
<input id="DataGrid1__ctl3_foiltype1" type="checkbox" name="DataGrid1:_ctl3:foiltype1" />
<label for="DataGrid1__ctl3_foiltype1">Caption</label></span>
....
我需要根據其他控件的選擇動態顯示或者隱藏foiltype1.問題在於我可以找得到DataGrid1__ctl3_foiltype1 這個東西,但我如何找到並對<label for="DataGrid1__ctl3_foiltype1">Caption</label>這個東西進行操作?
這裡面的 for= 是做什麼用的?