1
2
3
4
5
6
7
8
9
10
11
12
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
     <head>
          <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
          <title>Demonstration of Function allowing use of tab key in textareas - insert 5 blanks</title>
          <script type="text/javascript" src="createTextareaKeyDownFunction.js"></script>  <!-- include the JavaScript -->
     </head>
     <body onload="createTextareaKeyDownFunction(5);"> <!-- execute the function when the body has finished loading. The argument value is 5 and that will mean that five
                                                                   5 blanks will be inserted each time the tab key is pressed in the textarea(s) marked for this purpose -->
          If you press the tab key in the textarea below, 5 blank characters will be inserted<br>
          <textarea style="width: 95%; margin-left: auto; margin-right: auto;" class="tabs_in_textarea"></textarea> <!-- this textare will be processed -->
     </body>
</html>

 Is the text not being copied to the clipboard? Click Here for Help