Js限制Input框只能輸入數字

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

<input type="text" onkeyup="value=value.replace(/[^\d\.]/g,'')" />
相關文章
相關標籤/搜索