使输入框(input & textarea)变为只可读状态readonly="readonly",禁用输入框disabled="disabled"
使输入框变为只可读状态
readonly="readonly"
<input class="select-city" placeholder="请选择身份" readonly="readonly">
禁用输入框
disabled="disabled"
<input type="text" value="" disabled="disabled" placeholder="请输入姓名">
$("input,textarea") .attr("disabled", "disabled");
移除禁用
$("input,textarea").removeAttr("disabled");