title: Javascript How to get # id from the end of the HTML URL
body: <p>I have a webpage with some links on it</p>
  
  <pre><code>&lt;a href="#glass"&gt;Glass&lt;/a&gt;
  &lt;a href="#plastic"&gt;Plastic&lt;/a&gt;
  &lt;a href="#ceramic"&gt;Ceramic&lt;/a&gt;
  </code></pre>
  
  <p>that change options on the page.
  I want to get the #glass, #plastic or #ceramic in javascript at the end of the URL, but I want the option to work from other links from other websites.</p>