readonly fields html

The readonly attribute is a boolean attribute.
 
When present, it specifies that an input field is read-only.
 
A read-only input field cannot be modified (however, a user can tab to it, highlight it, and copy the text from it).

<html>
<head>
<script>
	function loadXMLDoc() 
	{
		document.forms["Form1"]["textHint"].value = document.forms["Form1"]["textBar1"].value
	}
</script>
</head>
<body>
	<form name="Form1">
		Type Here : 
		<input type="text" name="textBar1" onkeyup="loadXMLDoc()">
		<br> 
		Readonly Field : 
		<input type="text" name="textHint" id="textHint" readonly="readonly">
	</form>
</body>
</html>