+ 1

Plzz how do you write a program in javascript that tells the computer to change the color of text to another one every 5 second

22nd Dec 2016, 12:01 PM
Owen Jay
Owen Jay - avatar
6 Respostas
+ 2
you can use jQuery
22nd Dec 2016, 12:35 PM
kallzo
kallzo - avatar
+ 2
Sorry, i must have missunderstood that... i correct the JavaScript. Now it picks a random color out of an array and changes the text to this color. You can add as many colors as you wish to this array. Here's a list of supported colors: http://www.w3schools.com/colors/colors_names.asp and here's the updated Script (Press RUN) https://code.sololearn.com/WZPPdU5TkDfo/#js I hope this helps ;-)
22nd Dec 2016, 1:06 PM
Daniel Sattler
Daniel Sattler - avatar
+ 1
Hey. Have a look here, this is the JavaScript Function you need ;-) https://code.sololearn.com/WZPPdU5TkDfo/#js press the "RUN" Button and wait 5 Seconds I hope this helps
22nd Dec 2016, 12:13 PM
Daniel Sattler
Daniel Sattler - avatar
+ 1
Thanks but it only changes the color to red and back to white. how do you use multiple colors
22nd Dec 2016, 12:34 PM
Owen Jay
Owen Jay - avatar
+ 1
wow thanks daniel
22nd Dec 2016, 1:07 PM
Owen Jay
Owen Jay - avatar
26th Dec 2016, 8:08 PM
Mofid
Mofid - avatar