Look directly at the code
The code copy is as follows:
<form id="payForm" action="yeepay.html" target="_blank" method="post" onsubmit="return checkform();">
The onsubmit function in the example is a function triggered before form submission
The code copy is as follows:
function checkform() {
var value = $("input[name='payWay']:checked").val();
if (value == 1) {
$("#alipayment").submit();
return false;
}
return true;
}
If the form is returned, it will be submitted, otherwise it will not be submitted