Is it possible to know the content type of the cell in a HTML table using Javascript? -


i need store contents of html table in array in javascript. so, know content type (text/dropdown/input box) of each cell before accessing content of cell, can access cell value accordingly. kindly guide me how know content type beforehand.

you use

<table>     <tr>         <td><input type="text" id="something"></td>         <td><select id="something_else"></select></td>     </tr> </table>  document.getelementbyid("something").tagname; //returns: input  document.getelementbyid("something_else").tagname; //returns: select 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -