title: Split Link and Insert into the Form
body: <p>On my site I have a HTML form like the following:</p>
  
  <pre><code>&lt;label&gt;Name&lt;/lable&gt;
  &lt;input name="username" id="username19" type="text" value=""&gt;
  </code></pre>
  
  <p>and let's say that the link in the address bar of the browser is:</p>
  
  <blockquote>
    <p><a href="https://sitename.com/consulting/order-plan/#ref/testing" rel="nofollow noreferrer">https://sitename.com/consulting/order-plan/#ref/testing</a>**</p>
  </blockquote>
  
  <p>I want to do following thing:</p>
  
  <p>Pick the URL from the browser address bar and split it by "/". After choose the last word in this case it's "testing" and insert it to the form value with the ID "username19"</p>
  
  <p>Could you help me to do this with Javascript or jQuery?</p>