Answer the question
In order to leave comments, you need to log in
How to copy input value from one input to another input?
So the value is entered only in p
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<input type="text" value="some text"/>
<p></p>
<script>
$("input").keyup(function () {
var value = $(this).val();
$("p").text(value);
}).keyup();
</script>
Answer the question
In order to leave comments, you need to log in
Change field values instead of text
<script>
$("input").keyup(function () {
var value = $(this).val();
$("#second_input").val(value);
});
</script>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question