I want to change the text of the div "result" when a person writes something in the text box and make it the text the user wrote. is anyone pro/smart/knowledgeable enough to help me? I m new to java script so please help me. Here is the code:
<!DOCTYPE HTML>
<html>
<head>
<script>
function updateText(text){
document.getElementById("result").innerHTML =text;
}
}</script>
</head>
<body>
<div id="text">
Write to change:<input id="slide" type="text" value=""
onchange="updateText(this.value);" />
</div>
<div id="result" style="height:40px;width:40px;border:1px solid #999"></div>
<br/>
</body>
</html>
i would also like to know how to insert text which the user wrote into a prompt box into that element of the page.