1.在js中加入一个方法:

function judge_enter(){
  if(window.event.keyCode==13){
    return false;//阻止页面刷新的作用
  }
}
2.然后在body中
标签<input type='text' id='text' size='10' onkeypress='judge_enter();'/>

相关文章:

  • 2022-12-23
  • 2021-11-13
  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-15
  • 2022-12-23
  • 2021-08-16
  • 2021-09-20
相关资源
相似解决方案