how to capture key events in the div tag page?


Can any one tell me how to capture key events in div tag??

I wrote this code but it is not working?

<div id="SDiv" style="background-color: White; " onkeypress="kypress()">
     <asp:Label ID="LblSaveAndMoveNext" runat="server" Visible="False" Text="Save"></asp:Label>

<script type="text/javascript">
    function kypress() { EnableButtons(true);}

You must have a focus in order to trigger the keypress event.

Or you could apply the keypress on the document object.

Using jQuery:

     /*do something*/