title: How to check if a html control exists?
body: <p>How do I check if an HTML control exists?</p>
  
  <p>This is my code:</p>
  
  <pre><code>var id = ...
  if(document.getElementById(id)!=null)
  {
     //do something
  }
  </code></pre>
  
  <p>if the html control is radio doesn't work.</p>
  
  <p>How is this done?</p>