title: JavaScript Cookie Generator
body: <p>Here's my target:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;body&gt;
  &lt;script&gt;
  function changerScript()
  {
  var x = document.getElementById('changethis');
  var y = document.getElementById('textinputter').value;
  var z = '");';
  
  if(y == "")
  {
  alert('Please enter your JavaScript code, then click the Submit button.');
  }
  else
  {
  x.innerHTML = ('javascript:void(document.cookie="' + y + z);
  alert('JavaScript String Successfully Generated!');
  }
  }
  &lt;/script&gt;
  
  &lt;div align="center"&gt;
  &lt;input type="text" id="textinputter" /&gt;
  &lt;button type="button" onClick="changerScript()"&gt;Submit&lt;/button&gt;
  &lt;/div&gt;
  
  &lt;br /&gt;&lt;hr /&gt;
  
  &lt;div align="center"&gt;
  &lt;p id="changethis"&gt;&lt;/p&gt;
  &lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Now when you're dealing with Cookies, I know there work like this:</p>
  
  <pre><code>javascript:void(document.cookie="Cookie=cookiedata;");
  </code></pre>
  
  <p>How do I add multiple cookie's like in the example above because</p>
  
  <pre><code>javascript:void(document.cookie="Cookie=cookiedata; Cookie2=cookiedata2;");
  </code></pre>
  
  <p>doesn't work?</p>
  
  <p>Initially, I'd like to paste in the Cookie data (<code>Cookie1=cookie1data; Cookie2=cookie2data; Cookie3=cookie3data;</code>) and have JavaScript generate the code for me so then I can paste the code into Chrome's URL Bar and set the cookies with the generated JavaScript string.</p>