JQuery: current update of input value
This is where I started, and it changes the # user_name input when the script is run. How do I get it to update the value?
var $username = $("input#user_email").val();
$("input#user_name").val($username);
+3
stephenway
source
to share
2 answers
$("input#user_email").keyup(function(){
$("input#user_name").val($(this).val());
});
if you mean that when you type user_email you want on user_name
+6
gastonfartek
source
to share
$(function(){
$('input#user_email').bind('keyup',function(){
$("input#user_name").val($(this).val());
});
});
+4
Toni michel caubet
source
to share