I just started making a text-adventure in javascript this weekend.
I realized that the prompt input system can get really annoying, so I wanted to change over to a bar-input system that would collect input and store it in the "action" variable (see source), exactly like the one is this example I managed to find: http://iainlobb.com/dork/
SOURCE: http://dl.dropbox.com/u/96609235/mainfile.txt
(I know this might not be the most efficient way to make a text adventure, so I don't really want a lesson in the layout)
Steal his ;-)
Or if you want to make your own you basically just:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.