events - Fire keydown in Javascript -


Using Mootools, but a normal answer is OK.

I enter 'Enter' key in a web application.
When they press 'Enter', then it should react as if 'shift-enter' is pressed.

I just stop the entry, and use exec.insert HTML

I think I can fire an important incident, as if I am a Click or fire another event:

Click: $ ('myElement') fireEvent ('click', arg1);

KeyEye: $ ('myElement'). FireEvent ('keydown' ???);

But I do not know how.

I do not know what you are actually looking for, but when pressing the login key If it goes, the following change organizes the 'shifter'. Note that you have to manually specify the 'shifter' incident itself.

  $ ('element'). AddEvent ('keydown', function (e) {new event (e). Stop (); if (ek == 'ant') {this.fireEvent ('shiftenter');}});  

Comments

Popular posts from this blog

Is there an open source WebSockets (JavaScript) XMPP library? -

java - Is there an object like a "Set" that can contain only unique string values, but also contain a count on the number of occurrences of the string value? -

mysql - Can mysql_pconnect be called multiple times in one php page? -