我有2套单选按钮,这是我要做到以下几点:。选择不同的单选按钮进入不同的html页面
1)当所有的选择都是假的,显示的验证消息(这是工作,但点击时'重复保存'它会添加一个空行,我该如何防止这一点?)。
2)如果只选择设置1或设置2,则显示保存时的错误消息。 3)。当选择Set 1时,Set 2选择需要根据是或否将用户带到不同的页面。
在此先感谢!
Please make a selection
Radio Set 3
Yes
No
Please make a selectionRadio Set 2
Yes
No
JS
$('#Qbtn').click(function() {
if ((!$('#attachYes').attr('checked') === true) && (!$('#attachNo').attr('checked') === true) && (!$('#NotifYes').attr('checked') === true) && (!$('#NotifNo').attr('checked')) === true) {
//the validations are displaying correctly
$('#val1').show().append('
');
$('#val2').show().append('
');
} else {
if (($('#attachYes').attr('checked') === true) || ($('#attachNo').attr('checked') === true) && (!$('#NotifNo').attr('checked') === true) && ($('#NotifYes').attr('checked')) === true) {
//the user should be taken to page1.html when clicking save and it isn't doing it
window.location = "page1.html";
//then how do I write if either of radio set 1 is true and #NotifNo of Radio set 2 is true go to page2.html.
}
}
});
2013-07-08
squirc77