Answer the question
In order to leave comments, you need to log in
Why is there an error in the operation of the virtual BackSpace key?
An error occurs in the virtual key robot, which should delete one character at a time when pressed
. Here is the key code:
$(document).ready(function() {
function del() {
function del() {
var str = document.getElementById('phone').val;
document.getElementById('phone').val = str.substring(0, str.length - 1);
}
}
});
Answer the question
In order to leave comments, you need to log in
working code here: https://jsfiddle.net/0xL0fctq/89/
but I commented out the line $("#phone").mask(mask, {placeholder: "_", autoclear: false}); because it didn't work
In the fidler settings, it was necessary NOT to select onLoad, but simply No-wrap in head or No-wrap in body
The html code did not see the del function.
But this is not enough.
$(document).ready(function() {
function del() {
function del() {
var str = document.getElementById('phone').val;
document.getElementById('phone').val = str.substring(0, str.length - 1);
}
}
});
function del() {
var str = document.getElementById('phone').val;
document.getElementById('phone').val = str.substring(0, str.length - 1);
}
var str = $('#phone).val();
$('#phone').val(str.substring(0, str.length - 1));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question