萬盛學電腦網

 萬盛學電腦網 >> 腳本專題 >> javascript >> JQuery設置和去除disabled屬性

JQuery設置和去除disabled屬性

   //兩種方法設置disabled屬性

  $('#areaSelect').attr("disabled",true);

  $('#areaSelect').attr("disabled","disabled");

  //三種方法移除disabled屬性

  $('#areaSelect').attr("disabled",false);

  $('#areaSelect').removeAttr("disabled");

  $('#areaSelect').attr("disabled","");

copyright © 萬盛學電腦網 all rights reserved