document.getElementsByName("Name") code example
Example: select input by name javascript
var element = document.querySelector("form[name='second'] input[name='secondText']");
var element = document.querySelector("form[name='second'] input[name='secondText']");