JQuery Example
Screen shot
When user click on button then button is disabled?
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("button").click(function(){
$("button").attr("disabled", "disabled");
});
});
</script>
</head>
<body>
<button>Click Here</button>
</body>
</html>

You can download source code here