title: How to use if else statment in javascript with multiple drop-down list?
body: <p><em>I am trying to print select in multiple drop-down list, but prints only two words(CHENNAI AND IOS-XE , BANGALORE AND IOS-XR) could not print the remaining words
  Can anyone help me fix this?</em></p>
  <p><strong>Required Output :</strong></p>
  <p>if i select CHENNAI+IOS-XE   ---&gt; output : CHENNAI AND IOS-XE</p>
  <p>else if   BANGALORE+IOS-XR ---&gt; output : BANGALORE AND IOS-XR</p>
  <p>else if   CHENNAI+IOS-XR   ---&gt; output : CHENNAI AND IOS-XR</p>
  <p>else if   BANGALORE+IOS-XE ---&gt; output : BANGALORE AND IOS-XE</p>
  <pre><code>&lt;html&gt;
  &lt;body&gt;
    &lt;p&gt;SELECT THE REGION &lt;/p&gt;
    &lt;select id=&quot;choose&quot;&gt;
      &lt;option value=&quot;a1&quot;&gt;CHENNAI&lt;/option&gt;
      &lt;option value=&quot;b1&quot;&gt;BANGALORE&lt;/option&gt;
    &lt;/select&gt;&lt;/p&gt;
    
    &lt;p&gt;SELECT THE ROUTER TYPE &lt;/p&gt;
    &lt;select id=&quot;choose1&quot;&gt;
      &lt;option value=&quot;a2&quot;&gt;IOS-XE&lt;/option&gt;
      &lt;option value=&quot;b2&quot;&gt;IOS-XR&lt;/option&gt;
    &lt;/select&gt;&lt;/p&gt;
    
    &lt;button onclick=&quot;button()&quot;&gt;CLICK&lt;/button&gt;
  
    &lt;script&gt;
      function button() {
        var x = document.getElementById(&quot;choose&quot;).value;
        var y = document.getElementById(&quot;choose1&quot;).value;
        if (x == 'a1' || y == 'a2' ) {
          document.write(&quot;CHENNAI AND IOS-XE&quot;);
        }
        else if (x == 'b1' || y == 'b2'){
          document.write(&quot;BANGALORE AND IOS-XR&quot;);
        }
        else if (x == 'a1' || y == 'b2'){
          document.write(&quot;CHENNAI AND IOS-XR&quot;);
        }   
        else if (x == 'b1' || y == 'a2'){
          document.write(&quot;BANGALORE AND IOS-XE&quot;);
        }       
      }
    &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>