I would like to replace letters into numbers as they're typed inside an <input type="text">
box.
Currently I use this code:
function Auto(str)
{
var search = new Array(
"q","w","e","r","t","y","u","i","o","p"
);
var replace = new Array(
"1","2","3","4","5","6","7","8","9","0"
);
return str.replace(search, replace);
}
// me need make find in find_str but i dont know how...
$("#find").on('keypress',function(){
find_str = $("#find").val();
alert (Auto(find_str));
});
Tell me please how make find letter in find_str and how to write this code?
P.S.: alert() only for test.