user3405179 user3405179 - 3 months ago 12
jQuery Question

how to prevent shift + tab on focus out?

I want to call method on Press-

"TAB"
but not on
"Shift + Tab"
.

$(".txtPaymentMessage").keydown(function(e)
{
if(e.keyCode == 9)
{
alert("You Press Tab Only");
}
});

Answer

Hope this works

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