In Asp.net, press ENTER instead of the tab key.

Source: Internet
Author: User
Code

< Script Language = "JavaScript" Type = "Text/JavaScript" >
<! --
Window.doc ument. attachevent ( " Onkeydown " , Function (){
If (Window. event. keycode = 13 ){
Window. event. keycode = 9 ;
}
});
// -->
</ Script >

 

Attachevent description:

The attachevent method can dynamically add an event to an element in a webpage. When you want to add a click event to a button, you will write onclick = event name in the button. You do not need to use attachevent. prepare the written events and bind them to the elements as needed. in addition, attachevent supports binding multiple events to an element. the execution order is, followed by the binding first.

Syntax:

element. attachevent (etype, eventname)

return value:

Boolean

parameters:

element: dynamically add an event to the element.
etype: specifies the event type. for example: onclick, onkeyup, onmousemove and so on ..
eventname: specifies the event name. that is, the function you wrote.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.