Input content input restrictions

you can only enter numbers: < input type= "text" onkeyup= "if (! / ^ d+$/.test (this.value)) {this.value=this.value.replace (/ < sup id=" fnref-1 "> 1 < / sup > + / g class=");}" / >
like this, you can only enter numbers and keep one place after the integer decimal point, Boss Xie

< hr >
    < li id= "fn-1" > d please
Mar.03,2021

var reg = / ([0] | [1-9] *). [0-9] /;
if (! reg.test (this.value)) {

return false;

}
[this.value] = reg.exec (this.value);

Menu