[Javascript] [JavaScript ] keypress problem
M
lists at gazelasport.sk
Sun Oct 15 04:32:28 CDT 2006
only focused elements get keypress events. You can't focus DIVs. For
opera it's enough to have cursor over the element.
Bernu Bernard wrote / napísal(a):
> Hi list,
> In the following code, I get the alert box message in Opera.
> No message in Safari, FireFox, Camino.
> What am I doing wrong ?
>
> <body>
> <div id="text" style="width:150px ; height : 100px ; padding : 0.2em ;
> background-color : #aaa ; "
> onkeypress="alert('keypress');">hello</div>
> </body>
>
> Bernard
>
More information about the Javascript
mailing list