![]() |
|
|
+ Search |
![]()
|
Aug 31st, 2000 07:40
Martin Honnen, sudhir vk,
You can capture key events at the document level and submit the form
when the enter key is pressed:
if (document.layers)
document.captureEvents(Event.KEYPRESS);
document.onkeypress = function (evt) {
var key =
document.all ? event.keyCode :
evt.which ? evt.which : evt.keyCode;
if (key == 13)
document.formName.submit();
};