Heres how to get all input values and input titles seamlessly with a simple javascript loop. indoor basketball court dome Just make sure you have a div with a unique id which contains the inputs. Step 2: After creating your project folder i.e. In this case, the calling of getElementsByTagName is on the element before the period. You say you want a div with an 'undefined' id. I am not sure if this works or not. The first one will only retrieve elements of type input, that is , but not