Codice PHP:

<html
 <
head>
 <
script language "javascript" type="text/javascript">

function 
disabilita(){
    
document.getElementById('id_text').disabled=true;
}

</script>
</head>
<body onload="disabilita();">
<input type="text" id="id_text">

</body>
</html>