Ad Code

To replace or remove double, single quotes from string in javascript

$("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();
    }
});

 


 

Post a Comment

0 Comments