how to dynamically add REQUIRED attribute to textarea tag using jquery?

后端 未结 1 1159
再見小時候
再見小時候 2021-01-04 08:04

I tried adding REQUIRED attribute using .attr(\"required\",\"true\"); but its not making text area compulsory. Do not want to make all textar

1条回答
  •  不知归路
    2021-01-04 08:30

    $('#myTextarea').prop('required',true);
    

    0 讨论(0)
提交回复
热议问题