Hello. While I was sitting and writing the html / css code, I had one great idea. But, unfortunately, I do not know how to implement it, so I ask for help.

I need to read the information written, for example, in input type="text" and display it, for example, in the same textarea . Everything would be fine if my thoughts did not go so deep that I would have to learn the language that will help me in the implementation of this idea ..

But, with all this, I need not a banal text output, and so, if the user entered a random set of letters, then the information came out:

 "еррор, такой команды не существует" 

and if the user entered the correct command, then accordingly, information was output that for the command entered by the user.

 EXAMPLE: блаблабла = syntax error; random_money = Выдает рандомное количество денег, от 100-10000. 

Naturally, you have seen such implementations. A good example of this is codeacademy. In principle, this is what I want. But the paint is still worth it.

I have a deafness with other languages, and it would be desirable for you to advise books that will help me in learning the language I have described. Oh, how reluctant to learn another language, but for the sake of this implementation, I will try ..

  • I did not understand, "the language you described" is javascript or what? here is something like that ... not a codeacademy of course :) jsfiddle.net/oceog/49b8t - zb '
  • eicto, The fact of the matter is that I don’t even know WHAT all this needs to be written, so I ask how and in what language this can all be implemented :) - evils1

1 answer 1

Looks like you only need javascript. It is very easy to use it, because do not need to install anything. Just study and write.

Actually, the javascript file should be called Main.js. Online for some reason it does not work. http://jsfiddle.net/Xxcapog/zA6X5/

  • So you can learn from textbooks on the Internet. But if you do not want to be limited to simple operations, then you need to take up serious literature, because the language is quite complicated. - Boots
  • Thank you very much! Now I really need to delve into this javascript. You literally saved me. I suspect that if the teams will not be 2, as in the example, but 100 or more, then for all of them you should also write a separate piece where? True, it doesn’t look so scary anymore :) PS All yesterday and until that moment I sat in Google in search of an answer to my question, at the same time sitting in brackets and trying meaningless attempts to do anything. I want to sleep very much, but before that I still forced myself to go to the site and see if there were any more answers. The blessing he found =) - evils1
  • PPS: Yes, your code does not work on jsfiddle.net/Xxcapog/zA6X5 , but the benefit is it earned from liveweave.com/rGKLfr . I upgraded it a little under my version, so please write if I made a mistake somewhere. Of course, I will come to check your answer, but only when I am in full combat readiness. - evils1
  • Honestly, it is not very clear what you want to do with this program) the GiveMoney function does not start anywhere) And yet. I don’t like to use the switch, as I always forget how it is recorded. But this piece will shorten the code for you) - Boot
  • Yes, being in deep sleepiness, I removed the excess. Thanks for the tip. And about the switch, I read, thank you. In general, thanks for such an answer. Honestly, I didn’t expect me to give an answer to my 'lamer' question from the point of view of a javascript programmer :) - evils1