<input type='text' onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"> 转载于:https://www.cnblogs.com/huashengweilong/p/11049442.html