直接在input属性框中添加keyup事件

<!DOCTYPE html>  
<html>  
<head>  
    <meta charset="UTF-8">  
    <title></title>  
    <script src="jquery.min.js"></script>  
</head>  
<body>  
     <div >  
     <tr>  
        <td>  
            输入:<input name="test" value="asdf" onkeyup="value=value.replace(/[^\d]/g,'')"></input>  
        </td>  
     </tr>  
          
     </div>  
</body>  
</html>  

 

相关文章:

  • 2021-04-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-19
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-20
  • 2021-09-25
相关资源
相似解决方案