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,''));
});

posted @ 2017-10-31 17:42  smj1990  阅读(532)  评论(0编辑  收藏  举报