如何添加在线验证,以确保无线输入的选择,必须选择添加jQuery的表单验证Javascript?
<script type="text/javascript">
function choosePage() {
if(document.getElementById('weightloss').form1_option1.checked) {
window.location.replace("http://google.com/");
}
if(document.getElementById('weightloss').form1_option2.checked) {
window.location.replace("http://yahoo.com/");
}
}
</script>
<form id="weightloss">
<input type="radio" id="form1_option1" name="weight-loss" value="5_day" class="plan">
<label for="form1_option1"> 5 Day - All Inclusive Price</label><br>
<input type="radio" id="form1_option2" name="weight-loss" value="7_day">
<label for="form1_option2"> 7 Day - All Inclusive Price</label><br>
<input type="button" value="Place Order" alt="Submit button" class="orange_btn" onclick="choosePage()">
</form>
编辑职位,包括一个代码块,这样所有的标签出现... – LorenVS 2011-02-28 22:16:28
为什么你不选择默认的收音机之一? – m1k3y3 2011-02-28 22:23:51