只能输入数字和字母的正则表达式

onkeyup="this.value=this.value.replace(/[^w]/g,'')"
onpaste="this.value=this.value.replace(/[^w]/g,'')"
梅花香自古寒来
原文地址:https://www.cnblogs.com/zhuyeshen/p/10684761.html