Javascript examples for DOM:Element children
Retrieve hidden field value inside element with ID
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){// w ww . j ava 2 s. co m console.log(document.getElementById("c1s2a").children["my"]); } </script> </head> <body> <table> <tbody> <tr> <td id="c1s2a"> <input type="hidden" name="my" value="1"> </td> </tr> </tbody> </table> </body> </html>