<!DOCTYPE html>
<html>
<head>
</head>
<body>
<input type="button" id="button-id" value="Button">
<script>
function disableButton()
{
document.getElementById("button-id").disabled = true;
}
/*
run:
When click on button we disable the "button-id"
*/
</script>
<button onclick="disableButton()">Click To Disable</button>
</body>
</html>