1. 程式人生 > >js 監聽input變化

js 監聽input變化

chang rop for dds prop class brush input pre

$(document).on(‘input propertychange‘, ‘#addShop .form-control‘, function() {
  if($(this).val().length>0){
    $(this).css("color","#666");
  }else{
    $(this).css("color","#999");
  }
});

  

js 監聽input變化