Suppressing the tab key

P

Paul Thompson

Can I use JavaScript in some way to entirely suppress and control the
tab key, so that I perform all functions that tab performs? I can
detect the tab key, but can't seem to eliminate it.
 
E

Evertjan.

Paul Thompson wrote on 14 aug 2003 in comp.lang.javascript:
Can I use JavaScript in some way to entirely suppress and control the
tab key, so that I perform all functions that tab performs? I can
detect the tab key, but can't seem to eliminate it.

<body onkeydown="if(event.keyCode==9)alert('Tab');return false;">
<input>
<input>

The "return false" will keep the tab in the first textbox.

Tested IE6 only !!
 
A

asdf asdf

If you want to actually insert tabs into a textarea where the cursor
is (and not necessarily at the end), look at textranges.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top