<!DOCTYPE html>
<html>
<body>
<form>
Get Image:<input type="file" id="imgfile">
</form>
<p>Click the button below to disable the FileUpload button above.</p>
<button onclick="disableElement()">Disable FileUpload</button>
<script>
function disableElement()
{
document.getElementById("imgfile").disabled=true;
}
</script>
</body>
</html>