title: How to check element type in javascript
body: <p>I have  a situation in which i want to  convert a <code>&lt;select&gt;</code> tag into a <code>&lt;input type="text"&gt;</code> and <code>&lt;input type="text"&gt;</code> into <code>&lt;select&gt;</code> bu using some condition.
  So how can i know that <strong>this element a type text or type select using id attribute.</strong> </p>