title: How to display a dropdown selected of one page will be active in another page
body: <p>I had created a dropdown for some pages in index page, After selecting the a page from dropdown the page will redirect to the respective page. below is the code:</p>
  
  <p>i. Index.html</p>
  
  <pre><code>&lt;script&gt;
  function DropList() {
  var n = document.getElementById("sel").options.length;
  document.getElementById("sel").size = n;
  }
  
  function handleSelect(elm){
  window.location = elm.value;
  }
  &lt;/script&gt;
  &lt;script 
    src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt; 
    &lt;/script&gt;
  &lt;div&gt;
      &lt;select id="sel" onchange="javascript:handleSelect(this)"&gt;            
  &lt;option value="page1.html/"&gt;page1&lt;/option&gt;
  &lt;option value="page2.html/"&gt;page2&lt;/option&gt;
  &lt;option value="page3.html/"&gt;page3&lt;/option&gt;
  &lt;option value="page4.html/"&gt;page4&lt;/option&gt;
  &lt;/select&gt;
  &lt;/div&gt; 
  </code></pre>
  
  <p>Now after selecting the page1 from the dropdown the page will redirect to page1.html, where i have given the same drop down code as below:</p>
  
  <p>ii.Page1.html</p>
  
  <pre><code>&lt;div&gt;
      &lt;select id="sel" onchange="javascript:handleSelect(this)"&gt;            
  &lt;option value="page1.html/"&gt;page1&lt;/option&gt;
  &lt;option value="page2.html/"&gt;page2&lt;/option&gt;
  &lt;option value="page3.html/"&gt;page3&lt;/option&gt;
  &lt;option value="page4.html/"&gt;page4&lt;/option&gt;
  &lt;/select&gt;
  &lt;/div&gt; 
  </code></pre>
  
  <p>I want to to show the page1 option from the dropdown to be active(default selected in the dropdown) in page1.html page. since it gets redirected after selecting the page1 from the index page.Kindly help me how can i put the page as active.</p>