[Javascript] [JavaScript ] keypress problem

Bernu Bernard bernu at lptmc.jussieu.fr
Sun Oct 15 08:46:18 CDT 2006


Thanks a lot for this clear response.
Bernard
Le Oct 15, 2006 à 11:32 AM, M a écrit :

> 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
>>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript




More information about the Javascript mailing list