I find it hard to even conceptualize. An easy way would be for a large textarea occupy most of the screen, with a small input text element below it. The player will enter commands, and the output will be displayed in textarea .
The problem is that I want the input to be fully integrated. Think of the DOS screen. The prompt, > , after which you enter the command. Press "Enter", then the output will be displayed, and then another command > for the next command. The entrance is not separate, visually, from the exit. An example of what I would like to do can be seen here: http://www.youtube.com/watch?v=UC_FrikiZdE (except that instead of the mouse we select commands, they can be entered).
How will I do this in HTML (using JavaScript / jQuery to handle I / O)? I think itβs possible that everything was done in an editable textarea , but the Backspace button cannot erase anything from the > prompt and beyond, only the text that was entered.
What is the easiest way to do this? I could not find any demos or tutorials on the Internet. Can someone point me to what I might have missed? Thanks.
javascript jquery html php
Terranrich
source share