网格文本框输入,自动勾选

//网格文本框输入,自动勾选
$(function(){
    $("input[type='text']").focus(function(){ 
         $(this).parent().siblings("td[colname='MC']").children("input[type='checkbox']").attr("checked","checked"); 
    });
});


 $(this).attr('disabled', false);//设置输入框(文本框或者多选框)不可用
 $(this).attr('disabled', true);//设置可用
  $(this).prop("checked",true);//设置选中
  $(this).prop("checked",false);//设置不选中
$(this).is(":checked");//返回是否选中 true或者false


/*//网格文本框输入,自动勾选
$(function(){
    $("td [colname='JHJQ'] input[type='text']").focus(function(){ 
         $(this).parent().parent().find("[type='checkbox']").attr("checked","checked"); 
    });
});
*/

posted @ 2023-06-29 17:11  大虎1  阅读(19)  评论(0编辑  收藏  举报