<html>
<head>
<script type="text/javascript">
function func(obj){
var txt = document.getElementById("txt");
if (obj.checked) {
txt.disabled = false;
} else {
txt.disabled = true;
}
}
</script>
</head>
<body>
<input type="checkbox" name="chk" onchange="func(this)" />
<input name="txt" id="txt" disabled size="10" value="value" type="text" />
</body>
</html>