<form role="form" action="verify.php" method="post">
<input type="text" name="test" placeholder="xxx" >
<button type="submit" class="btn">登 录</button>
</form>
verify.php determines whether the input is illegal. If it is illegal, how can the user be prompted?
ps: If you use jquery to bind the button, you can. But I want to know if the submission method like form/action can output the judgment result to the front desk?
淡淡烟草味2017-05-24 11:36:13
If you use jq’s ajax method, you can load the error reminder to the end of the form
If you only use PHP, you can only add the error message and re-render the page