How to prevent shift + tab on focus?

I want to call the method on Press- "TAB" , but not on "Shift + Tab" .

 $(".txtPaymentMessage").keydown(function(e) { if(e.keyCode == 9) { alert("You Press Tab Only"); } }); 
+6
source share
1 answer

Hope this works

 $(".txtPaymentMessage").keydown(function(e) { if(e.which == 9 && !e.shiftKey) { alert("You Press Tab Only"); } }); 
+5
source

All Articles