限制input输入框只能输入 数字

<input type="text" oninput = "value=value.replace(/[^d]/g,'')">

原文地址:https://www.cnblogs.com/ya-jun/p/12378107.html