HTML-小总结

1.单选框设置只读

$('input:radio[name=tjx_xb_1]:not(:checked)').attr('disabled', true); 

//$("#tjx_pname_1").attr("readonly","readonly");
//$("#tjx_place_1").attr("readonly","readonly");
//$("#tjx_zw_1").attr("readonly","readonly");


2.设置文本输入框只读

$("#tjx_pname_1").attr("readonly","readonly");
$("#tjx_place_1").attr("readonly","readonly");
$("#tjx_zw_1").attr("readonly","readonly");


document.getElementById("tjx_tj_m_1").disabled = true;
document.getElementById("tjx_tj_1").disabled = true;
document.getElementById("tjx_qk_1").disabled = true;

你可能感兴趣的:(Html)