Hi guys! I'm absolutely new to JavaScript and would like to modify a textarea of a form (which is generated by an external script) as follows:
1.) Textarea on start: Labeled 'Your message here' in color 'rgb(136, 136, 136)'
2.) Textarea on focus: Label removed and color set to 'rgb(0, 0, 0)'
3.) Textarea on blur: Color of user input set to 'rgb(136, 136, 136)'; if there's no input, label reappears in color 'rgb(136, 136, 136)'
I've experimented around with
var foo = document.getElementById('HCB_textarea');
foo.innerHTML = 'Your message here';
foo.style.color = 'rgb(136, 136, 136)';
foo.onfocus = do something;
foo.onblur = do something;
but didn't get it right. TIA