Hello,
I want to disable tab event from input box on form
for that i tried:
<script language="JavaScript">
// disable tab event on form
$(window).keydown(function(event){
if(event.keyCode == 9 ) {
alert("tab is clicked") // it alerts but execute get vanished quickly
event.preventDefault();
return false;
}
});
</script>
and
document.querySelector('input').addEventListener('keydown', function (e) {
if (e.which == 9) {
e.preventDefault();
}
});
but still it is processing on above code.
is there any ither way?