<input type="text" >
<script>
function myFunction(id){
    var x=document.getElementById(id);
    x.value=x.value.replace(/\s+/g,'');
}
</script>

实现功能:输入框输入不了空格。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-30
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2022-12-23
  • 2021-08-09
  • 2022-12-23
  • 2021-04-06
相关资源
相似解决方案