<!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>
請(qǐng)問(wèn)如何去掉非數(shù)字出現(xiàn)的閃現(xiàn)問(wèn)題?比如輸入1...會(huì)先顯示...,然后...再消失
Willsf
2017-06-19 14:51:22
