Hi All,
I want to display the string captured by using onkeypress event now my problem is i am able to display the string in the text box but i want to display it using <span> or <div> as a string i am attaching the code also :
<html>
<head>
<title>Key Events Example</title>
<script type="text/javascript">
function handleEvent()
{
var FirstTextbox = event.srcElement;
var SecondTextbox = document.getElementById("txt2");
SecondTextbox.value = FirstTextbox.value;
}
var SecondTextbox = event.srcElement;
</script>
</head>
<body>
<p>Type some characters into the first textbox.</p>
<p>
<input type="textfield" id="txt1"
onkeydown="handleEvent()"
onkeyup="handleEvent()"
onkeypress="handleEvent()" ></input></p>
<p><textarea id="txt2" rows="15" cols="50"></textarea></p>
</body>
</html>