Results 1 to 2 of 2
  1. #1
    Guest

    Default JavaScript enter

    Hi

    a quick question

    in so many website that you visit, when you press the enter it will be the same as clicking on the submit button or go button.

    What I would like to know is what is the code that you can use that will do this using JavaScript?

    Thanks

    Please note

    The JavaScripts have more than one text input area.


  2. #2
    Guest

    Default Re: JavaScript enter

    have a look at this, not sure if it suits you.

    <!DOCTYPE html PUBLIC '-//W3C//DTD HTML 3.2//EN'>
    <html>
    <head><title>test javascript</title>
    <script type='text/javascript'>
    function getKey(keyCode) {
    if(window.event && window.event.keyCode == 113)
    {
    document.write('it works');
    /*
    window.location
    = 'http://regapps.ccit.arizona.edu/testsite/DARS/html3/evaluate.asp'
    */
    }
    document.write('finished <br />');
    document.write(window.event.keyCode);
    }

    </script>
    </head>
    <body>

    <script type='text/javascript'>

    document.write('start');
    document.onkeypress = getKey;

    </script>
    </body>
    </html>

Similar Threads

  1. How do you enter the wan ip address??
    By sezchwarn in forum PressF1
    Replies: 2
    Last Post: 22-12-2006, 10:44 AM
  2. javascript updating page, Javascript help
    By Morgenmuffel in forum PressF1
    Replies: 3
    Last Post: 29-06-2006, 03:05 PM
  3. how to enter ip address
    By mickeyc in forum PressF1
    Replies: 1
    Last Post: 06-09-2005, 09:41 AM
  4. How Do I Enter into Bios?
    By oscar91 in forum PressF1
    Replies: 2
    Last Post: 28-09-2002, 12:36 AM
  5. Replies: 2
    Last Post: 01-07-2001, 08:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •