<script> function useTab(el){ if(9==event.keyCode){ (el.selection=document.selection.createRange()).text="\t"; event.returnValue=false; } } </script> <textarea cols=40 rows=10 onkeydown="useTab(this)"></textarea>