您的位置:首页 > Web前端 > JQuery

jquery radio、checkbox 选项 内存问题

2015-07-24 09:26 686 查看
$("[checked]:not(:checked)").removeAttr("checked");

$("div[id='form_body'] textarea").each(function() {

$(this).text($(this).val());

// $(this).attr("readonly","readonly");

});

$("div[id='form_body'] select").each(function() {

$(this).find("option:not(:selected)").removeAttr("selected");

$(this).find("option:selected").attr("selected", "selected");

});

$("div[id='form_body'] :radio").each(function() {

if ($(this).is(":checked")) {

$(this).attr("checked", "checked");

}

// $(this).attr("readonly","readonly");

});

$("div[id='form_body'] :checkbox").each(function() {

if ($(this).is(":checked")) {

$(this).attr("checked", "checked");

}

// $(this).attr("readonly","readonly");

});
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: