Description
CDN Search
75CDN jsDelivr
<!DOCTYPE html>
<html>

<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8" />
<meta name="referrer" content="never">
<title>NetnrRun</title>
</head>

<body>
    <input id="txt" placeholder="请输入正整数" />
</body>

</html>
document.getElementById('txt').onkeyup = function () {
    this.value = this.value.replace(/[^\d]/g, '')
}