function onlyNum(o) { o.value=o.value.replace(/[^\d]/g,''); } <s:textfield name="CATEGORY_SEQUENCE" id="CATEGORY_SEQUENCE" οnkeyup="onlyNum(this);" ></s:textfield>
JavaScript 只能输入整数
最新推荐文章于 2023-03-02 16:12:29 发布
function onlyNum(o) { o.value=o.value.replace(/[^\d]/g,''); } <s:textfield name="CATEGORY_SEQUENCE" id="CATEGORY_SEQUENCE" οnkeyup="onlyNum(this);" ></s:textfield>