+ 2

Hey There! I added this code to my html but its not working? Can you help me out? Thanks in advance!

You can access the code from here: https://code.sololearn.com/W53Zym61yFce/#

3rd May 2020, 1:41 PM
Vinayak Sharma
Vinayak Sharma - avatar
4 Réponses
+ 3
Haha, the code is actually working fine :)) You are using select and option tag, so the expected result is a selection tab. And it is giving the expected output. Click on those buttons to see! Although you are doing several things wrong. Use double quotation only once, like : value="orange"
3rd May 2020, 1:57 PM
Arb Rahim Badsa
Arb Rahim Badsa - avatar
+ 1
Thanks buddy!!! But I noticed that the colour and bg colour don't change(or do they)? It shows this when i try that: JavaScript Console Uncaught SyntaxError: Invalid or unexpected token Line: 1Uncaught SyntaxError: Invalid or unexpected token Line: 1
3rd May 2020, 2:16 PM
Vinayak Sharma
Vinayak Sharma - avatar
+ 1
Vinayak Sharma You need to use javascript to get the desired output. Check the corrected code :)) https://code.sololearn.com/WWp6USki5FeV/?ref=app
4th May 2020, 4:02 AM
Arb Rahim Badsa
Arb Rahim Badsa - avatar
+ 1
Thanks a lot @Arb Rahim Badsa
4th May 2020, 2:55 PM
Vinayak Sharma
Vinayak Sharma - avatar