<html>
<body>
<h3>A demonstration of how to access a KEYGEN element</h3>
<keygen id="myKeygen" name="security">
<p>Click the button to disable the keygen field.</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() {
var x = document.getElementById("myKeygen");
x.disabled = true;
}
</script>
</body>
</html>