x
 
            
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Fmpq教程(fmpq.com)</title>
</head>
<body>
主页: <input type="url" id="myURL"><br><br>
<button onclick="disableBtn()">禁用 URL 字段</button>
<button onclick="undisableBtn()">启用 URL 字段</button>
<script>
function disableBtn() {
    document.getElementById("myURL").disabled = true;
}
function undisableBtn() {
    document.getElementById("myURL").disabled = false;
}
</script>
</body>
</html>