Welcome aboard! We are happy you are here and wish you good net-raft!
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<input id="old_id">
<script type="text/javascript">
function changeObject(oId) {
var o = document.getElementsByTagName(oId)[0];
o.id = "new_id";
alert("NEW ID = " + o.getAttribute("id"));
}
</script>
<button onclick="changeObject('input')">change id</button>
</body>
</html>
The most helpful JAVASCRIPT solutions
How can I get the last day and the next day in javascript ?JAVASCRIPT Click to see more ... 5.8K 507