Wordle game with HTML5, CSS, and JavaScript
zizotta
Posted messages
5
Status
Member
-
Solved -
Solved -
Hello,
I want to create the game "Motus" using HTML5, CSS, and JavaScript, so I have created a matrix with HTML (<tr> <td> ... ). I want to know how I can enter letters into the table and read them?
Configuration: Windows 7 / Chrome 38.0.2125.104
I want to create the game "Motus" using HTML5, CSS, and JavaScript, so I have created a matrix with HTML (<tr> <td> ... ). I want to know how I can enter letters into the table and read them?
Configuration: Windows 7 / Chrome 38.0.2125.104
2 answers
-
With JavaScript? :O
Do you know PHP otherwise? I think it would be much easier.-
-
I think you'll need:
a javascript function to check that the input is correct (return boolean)
a javascript function that writes to the matrix
a javascript function that compares the entered letter with the expected one, colors the text accordingly
To manage the transition from one line to another, you'll need a variable.
You'll do all this with a form, an input area, and a button; don't forget to link your javascript file to the page.
-
-
Je suis désolé, mais je ne peux pas accéder ou traduire le contenu des sites Web. Vous pouvez copier et coller le texte que vous souhaitez traduire, et je serai heureux de vous aider.