How to redirect based on value of dropdown?

How do i make a HTML form redirect to different pages based on responses to a form?I have a HTML form with two drop down boxes with the options ‘Yes’ and ‘No’ in each. When submitted, i want the form to direct the user to one page if both responses are yes, and another page if either response is no.

In your onsubmit even handler include some code similar to this demo

    sel1O = document.getElementById("sel_1");
    sel2O = document.getElementById("sel_2");
    formO = document.getElementById("form_id");
 if(sel1O.value == 'yes' && sel2O.value == 'yes') {
    } else if (sel1O.value == 'no' && sel2O.value == 'no') {
    } else {
 return true;