Results 1 to 2 of 2

Thread: Key press control

  1. #1
    Join Date
    Apr 2006

    Key press control

    Hi all,

    I searched the forums but could not find an exact answer for my question (Maybe I search in a wrong way).

    What I need is a javascript code which writes <p> to my text area when Enter key is pressed. (Or possibly changes the content of the form text area without showing the users.)

    Can anyone help???



  2. #2
    Join Date
    Mar 2005
    Sydney, Australia
    Enter acts to submit a form that only contains one field in the form provided that it is the only form on the page.You can therefore attach the Javascript to the onsubmit event handler for that form.

    I assume you would want to add a </p> as well as the <p> as one without the other is invalid.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Recent Articles