<input type="text" οnkeyup="value=value.replace(/[\W]/g,'')"/> 转载于:https://www.cnblogs.com/tuoxiong/p/6023697.html