title: set value of html input or textarea
body: <p>It is perfectly working. I want to get the current URL and set it inside textarea or input tag. Actually the value is set into a <code>p</code> tag.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function urlf() {
    document.getElementById("root").innerHTML = "The full URL of this page is: &lt; br &gt; " + window.location.href;
  
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;h2&gt;JavaScript&lt;/h2&gt;
  &lt;h3&gt;The window.location.href&lt;/h3&gt;
  &lt;button id="my btn" type="button" onclick="urlf()"&gt;
              get
          &lt;/button&gt;
  &lt;p id="root"&gt; &lt;/p&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>How can I do this?</p>