js光标移走时自动去除空格

$('input[type="text"]:not([readonly]),input[type="search"]:not([readonly]), input[type="number"]:not([readonly]), textraea:not([readonly])').blur(function(index, el) {
$(this).val($(this).val().replace(/s/g,''));
});

原文地址:https://www.cnblogs.com/smj1990/p/7762722.html