I have a HTML link - I am using an onkeypress to check for an Enter key (value 13). Problem is the event is valid if certain links are clicked or if one of the links had focus (tabbed to) when the Enter key was pressed.
Is there a way to know in JS that the focus was on one of the links (and which one) when the Enter key was pressed? Any examples here would be helpful enough to steer me on the right path.
My apologies if this turns out to be a stupid question. Thanks.
Is there a way to know in JS that the focus was on one of the links (and which one) when the Enter key was pressed? Any examples here would be helpful enough to steer me on the right path.
My apologies if this turns out to be a stupid question. Thanks.