$('#password1').change(function() { $("#password1").append("<input type='text' name='password2' id='password2' />"); });