title: How to pass a value from a parent window to another html page using javascript?
body: <p>I have 2 windows <code>home.html</code> and <code>result.html</code>.</p>
  
  <p>In <code>home.html</code> I have a <code>&lt;textarea&gt;</code> <em>#txtinput</em> and a <code>&lt;button&gt;</code> <em>#btn</em>.</p>
  
  <p>In <code>result.html</code> I have another <code>&lt;textarea&gt;</code> <em>#txtresult</em>.</p>
  
  <p>On <code>home.html</code>, if I enter a value into <em>#txtinput</em> and click <em>#btn</em>, I want to open <code>result.html</code> and pass the <em>value</em> of <em>#txtinput</em> into <em>#txtresult</em>.</p>
  
  <p>I've tried the below code from another post, which displays the value in the new window's body but won't display it in my element</p>
  
  <pre><code>var myWindow = window.open();
  myWindow.document.body.innerHTML = document.getElementById("txtinput").value;
  </code></pre>
  
  <p>Is it somehow possible in a simple way? I am relatively new to JavaScript, my courses are ongoing now and I am just curious to know the ways to do it. Any detailed help will be very much appreciated!</p>