“Invalid form control” only in Google Chrome

前端 未结 13 1715
感情败类
感情败类 2020-11-29 03:32

The code below works well in Safari but in Chrome and Firefox the form will not submit. Chrome console logs the error An invalid form control with name=\'\' is not fo

13条回答
  •  天命终不由人
    2020-11-29 04:14

    $("...").attr("required"); and $("...").removeAttr("required"); 
    

    didn't work for me until I putted all my jQuery code between that:

    $(document).ready(function() {
        //jQuery code goes here
    });
    

提交回复
热议问题