Add disabled attribute to input element using Javascript

后端 未结 7 754
执念已碎
执念已碎 2021-01-30 00:44

I have an input box and I want it to be disabled and at the same time hide it to avoid problems when porting my form.

So far I have the following code to hide my input:<

7条回答
  •  梦谈多话
    2021-01-30 00:54

    Just use jQuery's attr() method

    $(this).closest("tr").next().show().find('.longboxsmall').attr('disabled', 'disabled');
    

提交回复
热议问题