title: How to get id or name of iframe using javascript?
body: <p>I have one iframe:</p>
  
  <pre><code>&lt;iframe id="frame" name="frame" src="test.html"&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>Now, I want to get id or name that iframe and alert it, I used:</p>
  
  <pre><code>if (document.getelementbyid('frame') = frame) alert('OK');
  </code></pre>
  
  <p>But it doesn't work.</p>