get id value in javascript
snippet in c

value from getelementbyid

user8068

document.getElementById('numbers').value

getelementbyid

user5433

document.getElementById("someid");

get id of element javascript

user1730

var element = document.getElementsByTagName("div")[0];
var id = element.id;

js get id value

user530

var element = document.getElementById("YourElementId");
var value_element = document.getElementById("YourElementId").value;