How I can add and remove the attribute “readonly”?

前端 未结 4 1309
灰色年华
灰色年华 2021-02-18 20:19
$(document).ready(function() {
  //Check City Value
  var city_value = parseInt($(\"#city\").val());
  if( city_value == 0) {
     $(\"#state\").attr(\"readonly\", true)         


        
4条回答
  •  余生分开走
    2021-02-18 21:07

    Yes, finally I've found the solution. I've used onChange function.

    
    
    
    
     
    

提交回复
热议问题