<html>
<body>
Homepage: <input type="url" id="myURL">
<p>Click the button to disable the URL field.</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() {
document.getElementById("myURL").disabled = true;
}
</script>
</body>
</html>