problem description
modify the password default style to *
the environmental background of the problems and what methods you have tried
related codes
/ / Please paste the code text below (do not replace the code with pictures)
var str = "";
$("input").keyup(function(event){
var value = $(this).val()
if(event.keyCode==8){
str = str.substring(0,value.length)
}else if(event.keyCode>=49 && event.keyCode <= 90){
str+= value.substr(value.length-1,1)
}
$(this).val(value.replace(/./g,"*"))
})
what result do you expect? What is the error message actually seen?
can be correctly displayed as * * in the input process, but when the input speed is too fast, the actual value of input obtained is not accurate, and when the input speed is slow, it is correct
.