<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Text</title> </head> <input type="text" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}"/> <body> <script> </script> </body> </html>
李晓健
相关分类