Tab Key Behavior in Browser Editing Control

Web browsers are good as thin clients for web applications.

But if the user needs to enter some code (where bookmarks and formatting are important) in the editing window, inside the web browser he moves through the web page controls every time he presses the tab key, instead of typing the " tab ".

Are there any free web controls or is there any code to get the opposite behavior?
Google Docs does it perfectly.

Thanks.

+5
source share
2 answers

UI Yahoo , .

EDIT. ( ), YUI, Google , onKeyPress . , false, .

+3

keyDown :

<html>
<body>
<script type="text/javascript">
function keyFilter(e, field) {
  var key = window.event ? e.keyCode : e.which;
  if (key == 9) {
     field.value += "\t";
     return false;
  }
  return true;
}
</script>

<form>
<textarea onkeydown="return keyFilter(event, this);"></textarea>
</form>
</html>

EDIT: , , , , . , , .

+2

All Articles