Repeater 中checkbox选中的问题,js解决

2025-02-24 09:22:26
推荐回答(1个)
回答1:

用jquery比较好写
$(function(){
$("checkbox").click(function(){
var flag = $(this).attr("checked");
if(flag)
{
$(this).siblings("input [type='text']").show();
}
else
{
$(this).siblings("input [type='text']").hide();
}
});
}