我有以下代码.
<div class="form-group">
<label for="store_account_name">Store Title</label>
<input type="text" value="" class="form-control" name="store_account_name" id="store_account_name" placeholder="Please insert store title of the external store" required />
</div>
<div class="form-group">
<label for="store_url">Store URL</label>
<input type="url" value="" class="form-control" name="store_url" id="store_url" placeholder="Please insert store URL as described in help section" required />
</div>
Run Code Online (Sandbox Code Playgroud)
在提交按钮上,我想检查表单是否已经过验证.我有一个listner事件,它有preventDefault按钮.所以我只想在成功验证这两个输入时发送ajax调用.是否有任何JS函数来检查验证的状态或任何css属性是否添加到无效字段.