2
I need that when I put any value inside input1, this value appears already in input2. Since you’re both on the same page, you can do this?
2
I need that when I put any value inside input1, this value appears already in input2. Since you’re both on the same page, you can do this?
3
Can do with jQuery capturing the event keyup
.
Run the code below and see below an example working:
// JavaScript (usando jQuery).
$('#input1').keyup(function(){
$('#input2').val($(this).val());
});
<!-- HTML -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input id="input1"/>
<input id="input2"/>
Browser other questions tagged javascript jquery html css
You are not signed in. Login or sign up in order to post.
Thank you very much, this is exactly what I needed.
– Pedro Henrique Kuzminskas
Suppose the field already has a value when we open the page, it has to copy the code at the moment when the page opens?
– Wagner Fillio