How can I create a text input field
2 answers
Something like that:
<input type="text" id="textField" />
<br />
<span id="textOutput"></span>
<script type="text/javascript">
var input = document.getElementById("textField");
var output = document.getElementById("textOutput");
// sorry, it better to use "onkeyup" event
// to avoid the problem described in a post below
input.onkeyup = function(){
output.innerText = input.value;
};
</script>
+3
source to share