Jump to content
Fórum Script Brasil
  • 0

Tecla Enter


Guest Darlan

Question

2 answers to this question

Recommended Posts

  • 0

Cara,usei a mesma lógica do Delphi:

<html>

<script language="JavaScript">

  function teste(){

  if(event.keyCode==13){

    event.returnValue=false;

  }else alert(event.keyCode);

  }

</script>

<body onkeypress="teste()">

</body>

</html>

Se você apertar qualquer tecla,retorna o valor da mesma,mas se você tecla enter ele retorna nada...

... coloquei para exibir os valores,apenas para você ver que a tecla enter não pega,quando você for passar para seu código,não copie a parte vermelha!!

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      148691
    • Total Posts
      644524
×
×
  • Create New...