What's the easiest way to get all input fields inside a div without using a javascript library like jQuery? Similar to this jQuery snippet:
var inputs = $('#mydiv :input');
What's the easiest way to get all input fields inside a div without using a javascript library like jQuery? Similar to this jQuery snippet:
var inputs = $('#mydiv :input');
Try:
var inputs = document.getElementById('mydiv').getElementsByTagName('input');