+ 2
Hi guys can u help me can't find my mistake I want to change td color with math random when my td%!=O
15 Antworten
+ 2
u use jequri
+ 2
but I don't understand why u use to string method
+ 2
ok thx but I get it more easy wait
+ 2
+ 1
Here you go..
A configurable table with alternative column color (modified from @Kristina code)
https://code.sololearn.com/W42z9i0c7qMl/?ref=app
+ 1
good work but I do it I want with math random because wanna get other colors in the colls rgb are
+ 1
but how adding in my table
+ 1
Check out my code again.
+ 1
but ira more easy don't agree with me
+ 1
Yes, you're right.
0
then you need to use random number to get random color
colorRandom = Math.floor(Math.random()* 0xFFFFFF).toString(16);
0
No, I use Javascript only.
ES6 Javascript allows us to use $ in `string `
0
Please note that your code will keep on add extra table if you enter the values more then one time.
0
I used toStrong (16) to convert the default decimal number to hex number for color code.
This conversion not exactly correct, since 3digit hex like #fff also equal to #ffffff, but the error is minimum.
0
Should be the same.