ok got it! it is 38! sorry for putting up this question!
sai
2010-07-20 15:06:38
Check if the shift key is down:
//e = Event
(e.shiftKey && e.keyCode === 55) //returns true if Shift-7 is pressed
Use the keypress
event and test directly for the character as follows. Don't mess with key codes: they will vary between different keyboard types and cultures. Character codes won't.
var el = document.getElementById("your_input");
el.onkeypress = function(evt) {
evt = evt || window.event;
var charCode = evt.which || evt.keyCode;
var charStr = String.fromCharCode(charCode);
if (charStr == "&" || charStr == "_") {
alert(charStr);
return false;
}
};