jquery禁用文本框

禁用文本框

//文本框禁用
$("input[type='text']").each(function () {
  $("#" + this.id).attr("disabled", true);
});

启用文本框

//文本框启用
$("input[type='text']").each(function () {
  $("#" + this.id).removeAttr("disabled");
});

  

posted @ 2016-12-05 16:05  冷战  阅读(8805)  评论(0编辑  收藏  举报