input输入框判断处理只能输入数字

<tr>

                            <th width="16%">
                                <font color="red">*</font>联系电话
                            </th>
                            <td width="34%">
                                <input type="text" id="lxPhone" name="lxPhone" onkeyup="value=value.replace( /[^\d]/g,'')" />
                            </td>

</tr>

猜你喜欢

转载自blog.csdn.net/u012858008/article/details/81223304