How to handle enter key in javascript

Ads
 

How to handle enter key in javascript

Can any one tell me how to handle the enter key event on a Button in HTML. Like in my simple HTML page i want to submit the form even if user hits the enter key from keyboard instead of button.

View Answers

March 17, 2011 at 12:58 PM

Enter key event in html JavaScript

This is very simple. You just need to place your code within the

and
tag. As given below...

<form action="iPage.php" method="post">
<input type="text" name="iText">
<input type="submit">
</form>

It will effect the form even if the enter key get hit from keyboard.

Ads









Related Tutorials/Questions & Answers:
How to handle enter key in javascript
How to handle enter key in javascript  Can any one tell me how to handle the enter key event on a Button in HTML. Like in my simple HTML page i want... of button.   Enter key event in html JavaScript This is very simple. You
How to enter elemets in a hashmap and check for the existence of a particular key?
How to enter elemets in a hashmap and check for the existence of a particular key?  Hi, I am trying to read a csv file and storing its contents in a hash map and checking the existence of a particular key in the hash map. Here
Advertisements
how to handle MySQLIntegrityConstraintViolationException?
how to handle MySQLIntegrityConstraintViolationException?  Cannot add or update a child row: a foreign key constraint fails (outerdb.outerpatient, CONSTRAINT outerpatient_ibfk_1 FOREIGN KEY (xrayno) REFERENCES xray (xrayno
in this coding even backspace key and enter key should accept....
in this coding even backspace key and enter key should accept....   in this coding even backspace key and enter key should accept....plez help me and make changes to which it accept backspace and enter key ....plez plez plez its
JavaScript Key Event
>TextBox shows Key Event</h2> <script language="JavaScript">... JavaScript onkeyup Event...; This section illustrates you the use of onkeyup event in JavaScript. In the given
JavaScript Array get key
JavaScript Array get key     ... in understanding JavaScript Array get key. For this we implement JavaScript...; are addressed using the key strings("R", "I", and "N"
How to design key, design key, key
How to design key       It has been made easy now to design a key by this example, just...: Take "cccccc" color and choose Pen tool (P key), Make points. Select
How to use java.net.URLConnection to fire and handle HTTP requests?
How to use java.net.URLConnection to fire and handle HTTP requests?  How to use java.net.URLConnection to fire and handle HTTP requests
How does Java handle integer overflows and underflows?
How does Java handle integer overflows and underflows?   hi, How does Java handle integer overflows and underflows? Thanks
JavaScript Array get key
JavaScript Array get key     ... in understanding JavaScript Array get key. For this we implement JavaScript...; are addressed using the key strings("R", "I", and "N"
How to handle Transaction IN and OUT in Inventory using java
How to handle Transaction IN and OUT in Inventory using java  Hi... if i key in all these values once, and click submit it should fill 10 fields in the database with one submit. Now the problem is i have no idea how to do
how to use foreign key in java
how to use foreign key in java  I have two tables in my MySQL..., first name varchar(10), primary key(id) ) CREATE TABLE table2 ( id_fk int, last varchar(30), CONSTRAINT fkid FOREIGN KEY(idfk) REFERENCES table1(id) ON DELETE
how to show popup in javascript
how to show popup in javascript  How to show popup in javascript
How can you handle form in Spring 3.2 MVC?
How can you handle form in Spring 3.2 MVC?  Hi, How can you handle... the How can you handle form in Spring 3.2 MVC?   Hi, This article.... For more please visit the How can you handle form in Spring 3.2 MVC
how to put php in javascript
how to put php in javascript  How to write a javascript code inside php block
How do I handle the reaction of a circle and a semi-circle colliding in java?
How do I handle the reaction of a circle and a semi-circle colliding in java?  How do I handle the reaction of a circle and a semi-circle colliding in java
How to create primary key using hibernate?
How to create primary key using hibernate?  Hi, How to create primary key using hibernate? Thanks
how tohow to create a table with primary key and foreign keyhow to create a table with primary key and foreign key
how tohow to create a table with primary key and foreign keyhow to create a table with primary key and foreign key  how to create a table using java language with primary key and foreign key   Hi Friend, A foreign
How to add key value pair in Java
How to add key value pair in Java  Hi, I have to store the key and value pair in Java. How to store key value pair in Java? Thanks   Hi, You can use the put method of Hashtable. Check the tutorial Creating a Hash
How to encrypt JavaScript?
How to encrypt JavaScript? Tutorial on Obfuscator tool of JavaScript In this section I will tell you about a tool for encrypting the JavaScript. If don't want your code to be readable the you can use the JavaScript Encryption
How to auto increment primary key in mysql...
How to auto increment primary key in mysql...  How to auto increment primary key in mysql... and one more thing i need to get auto increment value in front end each time for inserting the value[JSP
how to handle action events in case of more than one JFrame
how to handle action events in case of more than one JFrame   I have downloaded a snake game project from the internet, initially this project... is not moving and i am not getting to point how to resolve this problem .. So
Java File - Learn how to handle files in Java with Examples and Tutorials
handling in Java. You will learn how to handle file in Java. Examples given here... in Java Reading files in Java How to read file in Java into byte... into bytearrayoutputstream Reading binary file into byte array in Java How
How to handle the list dynamically in struts inside logic:iterate tag
How to handle the list dynamically in struts inside logic:iterate tag  I am having following code in JSP <table> <tr> <logic:iterate name="loginForm" id="inutParams" property="inutParams" indexId="i"> <
how to match the key word from a text file
how to match the key word from a text file  p>Hi all, I have the code to match the key word and from the text. I have input like this reader.txt Guindy National Park is located in Chennai , South India , one of the last
How to check text in textbox using JavaScript
How to check text in textbox using JavaScript  How to check text in textbox using JavaScript I have a form in HTML that contains text feilds... me.   JavaScript validation example to check text in textfeild <
how to assign javascript variable value to a jsp variable
how to assign javascript variable value to a jsp variable  how to assign javascript variable value to a jsp variable
how to call javascript function from flex
how to call javascript function from flex  how to call javascript function from flex
how to sort the elements of hashmap and to print output the key and the value attached to it
how to sort the elements of hashmap and to print output the key and the value attached to it  how to sort the elements of hashmap and to print output the key and the value attached
How to pass javascript variable in Scriplet of JSP?
How to pass javascript variable in Scriplet of JSP?  How can I assign the value of a javascript variable to a variable declared in jsp scriplet? Is it possible
how to update specific row in on update key in the Navicat for mysql trigger
how to update specific row in on update key in the Navicat for mysql trigger   Blockquote insert into two(name, date) select name, curdate() from one on duplicate key update name=values(name

Ads