使用jquery选择select默认选择
$("select[name="nodeNum"] option[value= ' "+data.nodeNum+" ']").prop('selected,true);
使用jquery选择select中的被选内容
$("select[name='nodeNum']" option:selected);
使用jquery选择type = radio的默认选择
$("input[name="nodeNum"] radio[value= ' "+data.nodeNum+" ']").prop('checked',true);
使用jquery选择type = radio的被选内容
$("input[name='nodeNum']:checked");
if(updateUserInfo.status == 0){
$("#updateUserForm input[name='status']").eq(0).prop("checked",true);
}else if(updateUserInfo.status == 1){
$("#updateUserForm input[name='status']").eq(1).prop("checked",true);
}
网友评论