get input id in javascript code example
Example 1: Javascript get text input value
var inputValue = document.getElementById("myTextInputID").value;
Example 2: get id of element javascript
var element = document.getElementsByTagName("div")[0];
var id = element.id;