1.input 标签的required 需要提交按钮才可以触发.
<input type="file" name="upload" required />
<input type="submit" onclick="if(check()) on_submit()" /> //可以触发.
改成:<input type="button" onclick="if(check()) on_submit()" /> //不能触发
时间: 2024-10-18 16:37:49
1.input 标签的required 需要提交按钮才可以触发.
<input type="file" name="upload" required />
<input type="submit" onclick="if(check()) on_submit()" /> //可以触发.
改成:<input type="button" onclick="if(check()) on_submit()" /> //不能触发