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

后端 未结 1 1147
再見小時候
再見小時候 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)
提交回复
热议问题