How to check element type in javascript

Viewed 20434

I have a situation in which i want to convert a <select> tag into a <input type="text"> and <input type="text"> into <select> bu using some condition. So how can i know that this element a type text or type select using id attribute.

5 Answers
Related