title: Set/Get input value using cookie
body: <p>I want the switch button to remember selected option. Because when I refresh browser my selection is resetting..  How can I do that?</p>
  
  <p>Here is my code:</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;input type="button" value="Tak" onclick="return change(this);" /&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>&lt;script&gt;
      function change( el )
      {
          if ( el.value === "Tak" ){
              el.value = "Nie";
          }else{
              el.value = "Tak";
          }
      }
  &lt;/script&gt;
  </code></pre>