3
I wrote the following script:
<input type="password" class="email password_action" placeholder="Account Password" id="user_password" name="user_password" required>
<? for($i=0; $i<=9; $i++){ ?>
<button id="keyboard_<?=$i;?>" class="btn btn-default" type="button" value="<?=$i;?>"><?=$i?></button>
<script language="javascript">
$(document).ready(function() {
var valueKey = $('#keyboard_<?=$i;?>');
valueKey.click(function(){
//$("#user_password").attr("value",valueKey.val());
$('#user_password').append($('#user_password').attr(valueKey.val()));
alert(valueKey.val());
});
});
</script>
<? } ?>
Only that by clicking the button that refers to the number to enter the password, it does not add in the password field.
As I do so by clicking on any of the numbers shown inside the for, add the value of the button to the input?
Good morning, and to add a "Backspace" button together?
– Sr. André Baill
If I put an Alert(txt), it comes the numbers as they are pressed, but does not fill in the field
– Sr. André Baill
It worked, I changed the name of the field and it worked well! I will post the full script. In case someone needs.
– Sr. André Baill
Sorry, I just got back, glad you got :D
– Wesley