$("input").attr("autocomplete", "off");
$('input[type=text],textarea').on('keypress', function (e){
var ingnore_key_codes = [34, 39];
if ($.inArray(e.which, ingnore_key_codes) >= 0){
e.preventDefault();
$(".error").html("only valid characters are allowed").show();
}else{
$(".error").hide();
}
});
0 Comments