javascript - Synchonise 2 input fields, can it be done using jQuery? -



javascript - Synchonise 2 input fields, can it be done using jQuery? -

can jquery synchronise or re-create text of 1 input field when input modified? example:

<input id="input_a" type="text" /> ...if type here <input id="input_b" type="text" /> ... copied here

can jquery this?

try this:

$("#input_a").bind("keyup paste", function() { $("#input_b").val($(this).val()); });

for jquery 1.7+ utilize on:

$("#input_a").on("keyup paste", function() { $("#input_b").val($(this).val()); });

example fiddle

javascript jquery

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -