input.html 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <!-- Code by Sunit Kumar Nandi -->
  2. <!DOCTYPE html>
  3. <html lang="en">
  4. <head>
  5. <meta charset="utf-8" script=>
  6. <link rel="stylesheet" type="text/css" href="./style.css">
  7. <script language="JavaScript" type="text/javascript">
  8. $("textarea").keydown(function(e){
  9. var $this, end, start, v;
  10. if (e.keyCode === 9){
  11. start = this.selectionStart;
  12. end = this.selectionEnd;
  13. $this = $(this);
  14. v = $this.val();
  15. $this.val(v.substring(0,start)
  16. + "\t"
  17. + v.substring(end));
  18. this.selectionStart = this.selectionEnd = start + 1;
  19. e.preventDefault();
  20. }
  21. });
  22. </script>
  23. </head>
  24. <body>
  25. <form name="form1" method="post" target="output" action="output.php?saving=1">
  26. <br/><br/>
  27. <textarea name="textarea" cols="80" rows="10" placeholder="Write your program here" spellcheck="false"></textarea>
  28. <br/><br/><br/>
  29. <input type="text" name="stdin" autocomplete="on" placeholder="Standard input" wrap="hard">
  30. <br/><br/>
  31. <input type="text" name="args" autocomplete="on" placeholder="Command-line arguments">
  32. <br/><hr/><br/>
  33. <button type="submit"> &#9654; Run</button>
  34. </form>
  35. <button href="textinput.php" target="output">Submit text file</button>
  36. <!--<div style="padding:30px;"><a href="#" class="button">&#9654; Run</a></div>-->
  37. </body>
  38. </html>