Expand|Select|Wrap|Line Numbers
- function color()
- {
- var box = document.getElementById('message');
- box = box.style.color = "#FF0000";
- }
I don't want to have to repeat a lot of code over and over for different colours. Is there anyway I can use one function to change to different colours?
So if the onclick is color(red) it turns red or color(blue) turns blue etc...
Would that be possible and what code would I need?
Hope I was clear,
Thanks,
Sam