<input id='testName' type='checkbox' value='Yes' name='testName'>
<input id='testNameHidden' type='hidden' value='No' name='testName'>
Before submitting the form , disabled the hidden field based on the checked condition
if(document.getElementById("testName").checked){
document.getElementById('testNameHidden').disabled = true;
}
沒有留言:
張貼留言