复选框判断是否选中

//是否置顶
var information_stick = "";
if ($(".information_stick").is(":checked")) {
information_stick = "True";
}
else {
information_stick = "False";
}
前台代码:

//AB版区
if ("<%=information_AB%>" == "True") {
$(".information_AB").attr("checked",true);
}
else
{
$(".information_AB").attr("checked", false);
}

你可能感兴趣的:(复选框判断是否选中)