0
Get JavaScript to detect an input
Hi, I'm trying to create a text-based game that uses a prominent input bar on the bottom of the page. However, since I'm new to code, I don't know how I can get JavaScript to detect what the player types into the input. How can I get it to do this?
3 Respuestas
+ 5
<input type="text" id="lol">
do this
<script>
x = document.getElementById("lol").value // this is the thing u want
</script>
0
Thanks!
0
thanks for liking my code