<html>
<body>
Homepage: <input type="url" id="myURL"><br><br>
<button onclick="disableBtn()">Disable URL Field</button>
<button onclick="undisableBtn()">Undisable URL Field</button>
<p><strong>Note:</strong> elements with type="url" are not supported in IE 9 (and earlier), or Safari.</p>
<script>
function disableBtn() {
document.getElementById("myURL").disabled = true;
}
function undisableBtn() {
document.getElementById("myURL").disabled = false;
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_url_disabled3 by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:17:21 GMT -->
</html>