Advertisement
quantumech

Untitled

Jan 16th, 2020
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.78 KB | None | 0 0
  1. <head>
  2.     <title>JQuery terminal test</title>
  3.  
  4.     <!-- Import JQuery terminal dependencies -->
  5.     <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
  6.     <script src="https://unpkg.com/jquery.terminal@2.x.x/js/jquery.terminal.min.js"></script>
  7.     <link rel="stylesheet" href="https://unpkg.com/jquery.terminal@2.x.x/css/jquery.terminal.min.css"/>
  8. </head>
  9. <body>
  10.  
  11.     <div id="terminal"></div>
  12.  
  13.     <script>
  14.         // Initialize JQuery-Terminal
  15.         let term = $("#terminal").terminal()
  16.  
  17.         // Prompt user for input: "> Please input some text: "
  18.         term.read("Please input some text: ", function(userInput)
  19.         {
  20.             // Print user's input back into the terminal: "You typed the following: <userInput>"
  21.             term.echo("You typed the following: " + userInput)
  22.         })
  23.     </script>
  24. </body>
  25. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement