title: Get an element's ID and compare it to a string OR another ID
body: <p>How can I get the ID of an element and compare it to a string OR another id ?</p>
  
  <p>What I would like to do exactly is make a condition that would get the element's ID and compare it to a certain string or another element's ID.</p>
  
  <p>I have this piece of code right now to compare my id to another id (which obviously doesn't work):</p>
  
  <pre><code>function Something(elemid)
  {
   if(elemid == document.getElementById('myid').id)
     {
      ...
     }
  }
  </code></pre>
  
  <p>Or this piece of code to compare to a string (doesn't work either):</p>
  
  <pre><code>if(elemid == "mystring")
  {
  ...
  }
  </code></pre>
  
  <p>This is a simple problem, but still, I can't seem to find anything around here or even on other websites that would be what I am searching for.
  <strong>I can't use any JQuery whatsoever, so any Javascript only anwser would be really appreciated.</strong></p>