Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <head>
- <title>JQuery terminal test</title>
- <!-- Import JQuery terminal dependencies -->
- <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
- <script src="https://unpkg.com/jquery.terminal@2.x.x/js/jquery.terminal.min.js"></script>
- <link rel="stylesheet" href="https://unpkg.com/jquery.terminal@2.x.x/css/jquery.terminal.min.css"/>
- </head>
- <body>
- <div id="terminal"></div>
- <script>
- // Initialize JQuery-Terminal
- let term = $("#terminal").terminal()
- // Prompt user for input: "> Please input some text: "
- term.read("Please input some text: ", function(userInput)
- {
- // Print user's input back into the terminal: "You typed the following: <userInput>"
- term.echo("You typed the following: " + userInput)
- })
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement