用户注册



邮箱:

密码:

用户登录


邮箱:

密码:
记住登录一个月忘记密码?

发表随想


还能输入:200字

Kiritoseven    -  云代码空间

——

复选框的自动勾选

2014-07-01|1304阅||

摘要:选中列表中的一行数据,通过读取复选框的状态实现自动勾选

function rowSelected(){
    //移除已选中
    $("#leftTable tr").removeClass("selectedbg");
     //选中一行
    $(this).addClass("selectedbg");
    //获取选中行的id
    var currentRowId = $(this).attr("id");
    $("#topPageDiv").load("${ctx}/ref/asd.action?brrId="+currentRowId, function(){
        //判断复选框的状态值
        if("true"==$("#active").val()){
            $("input[name='active']").attr("checked", true);
       }else{
            $("input[name='active']").attr("checked", false);
        }
    });
}
顶 0踩 0收藏
文章评论
    发表评论

    个人资料

    • 昵称: Kiritoseven
    • 等级: 中级程序员
    • 积分: 207
    • 代码: 0 个
    • 文章: 2 篇
    • 随想: 2 条
    • 访问: 18 次
    • 关注

    人气代码

      最新提问

        站长推荐