So i got this exercise at my school and i cant for the life of me find the answer here is : Take advantage of the onchange event to make a page with a text box where if the user types a number, it will turn yellow if you type a String then turn green and leave it blank to make it red. please help
Asked
Active
Viewed 301 times
0
-
1Show an attempt... – William_Wilson May 28 '18 at 15:13
-
i dont know where to use the onchange event – Black Mamba May 28 '18 at 15:17
-
Since you are in a class which covers HTML and JavaScript you should be able to show us a text box at minimum. If you can't do that, google should provide dozens if not hundreds of examples. https://www.google.com/search?q=html+textbox+onchange – William_Wilson May 29 '18 at 11:05
1 Answers
0
Ok, First, You need to do something, show some code or anything else, otherwise, nobody could help you because is your homework and that's not correct.
Second, take a look on this:
https://www.w3schools.com/jsref/event_onchange.asp
That's an example how to use Onchange event in a HTML tag. You also need to take a look on how to add classes or style to a HTML tag using Javascript.
Nothing else I can tell you without doing your work.
Good luck. If you have any doubt, after do something, let me know.

Luis Tangui
- 1
- 1