Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<form action="/action_page.php" method="get">
  Username: <input type="text" name="usr_name">
  Encryption: <keygen id="myKeygen" name="security">
  <input type="submit">
</form><br>
<button onclick="disableKey()">Disable Keygen field</button>
<button onclick="undisableKey()">Undisable Keygen field</button>
<script>
function disableKey() {
  document.getElementById("myKeygen").disabled = true;
}
function undisableKey() {
  document.getElementById("myKeygen").disabled = false;
}
</script>
</body>
</html>