msn email google-talk twitter tumblr flickr

jquery live

动态绑定回车的keydown事件到input

   1      $("input").live("keydown",function(e){
   2               alert(e.which);
   3                     if (e.which == 13) {
   4                          return false;
   5           }
   6      });

Possible event values: click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, keydown, keypress, keyup

Currently not supported: blur, focus, mouseenter, mouseleave, change, submit

Update: DO NOT ABUSE live() in your application, because there is something wrong with Chrome5(or 6?).

http://code.google.com/p/chromium/issues/detail?id=43926#c3