Look directly at the code
The onsubmit function in the example is the function that is triggered before the form is submitted
function checkform() {
var value = $( "input[name='payWay']:checked").val();
if (value == 1) {
$("#alipayment").submit();
return false;
}
return true;
}
The form will be submitted only if true is returned, otherwise it will not be submitted.
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn