javascript get element name from this 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']");