JQuery/JS Keycodes: Several keycodes in one IF statement?

Try this if ( // get all the keys between 65-90 (e. KeyCode >= 65 && e. KeyCode = 31 && e.

KeyCode = 58 && e. KeyCode.

Instead of asking a new question. Can you type me a quick except method? I tried this: if ( (e.

KeyCode >= 31 || e. Keycode = 48 || e. Keycode Thanks – jQuerybeast Oct 5 at 18:28 @jQuerybeast I added some more info which might be useful to you – Michael Haren Oct 5 at 19:21.

If you want everything from 31 to 90 except for those from 48 through 57: if (e. KeyCode >= 31 && e. KeyCode = 48 && e.

KeyCode = 31 && e. KeyCode = 58 && e. KeyCode.

Cause it doesn't seem to be working. Thanks alot sir – jQuerybeast Oct 5 at 18:59 I'm pretty sure it should work, but I have no idea what the rest of your code is doing. You should be aware that key codes are not the same as character codes.

If you're expecting "keydown" and "keyup" events to give you ASCII/UTF character codes, well, they won't. – Pointy Oct 5 at 19:40 Well I was just alerting the keycode and it wasn't working. For some reason only this worked: if ((e.

KeyCode >= 58) || (e. KeyCode KeyCode == 47)). I am calling everything greater than 58, less than 45 and 47 to call the alert.

So numbers and the period are not alerting. Thanks anyway – jQuerybeast Oct 5 at 22:54.

If ((e. KeyCode > 65 && e. Keycode KeyCode == 44 || e.

KeyCode == 47){ //do stuff }.

Doesn't work at all. – jQuerybeast Oct 5 at 18:14 Not quite @Andri - that will never be true, as written, because neither 44 nor 47 are between 65 and 91. – Pointy Oct 5 at 18:15 ouch!

I thought @jQuerybeast was getting tired. I see now that I must immediately stop coding for today, or risk regretting it tomorrow. Fixed it btw.

– Andri Oct 5 at 19:16.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions