0

how do you change the colour of words in js

27th Aug 2016, 4:51 AM
Slayer
Slayer - avatar
2 Respuestas
+ 3
<p id="demo" onclick="changeColor()">Slayer</p> <script> function changeColor() { document.getElementById("demo").style.color = "deeppink"; } </script> // when user click "Slayer", font color changed
27th Aug 2016, 7:13 AM
Dick
0
Thnx 'Dick'!!!!!! Your account's name is cool!
27th Aug 2016, 6:49 PM
JS of MC(not C++ || java)
JS of MC(not C++ || java) - avatar