How can i connect my script to an html/css code to make my app more interactive ? Thk's | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How can i connect my script to an html/css code to make my app more interactive ? Thk's

https://code.sololearn.com/W2Tgc2QKm1lW/?ref=app

2nd Oct 2018, 4:55 PM
Remdrd
Remdrd - avatar
2 Answers
+ 1
for input use button/image onclick move(choice) for display Add picture <img id=""> Three for your move Three for bot move all display none then use script to show it getElementByID(choice).style.display = "block" also, add two pictures for win/lose, and use determine win/lose function to control which one to show.
3rd Oct 2018, 6:50 AM
Gordon
Gordon - avatar
+ 1
You can attach or connect by adding script tag like this. you can either write your script inside that tag or attach an external .js file that contains all of your JavaScript code. here is example for external script: https://code.sololearn.com/W6n71cAg2vii/?ref=app
4th Oct 2018, 3:23 PM
Bil Al
Bil Al - avatar