One might believe that vendor prefixes are necessary (From css-tricks.com):
::-webkit-input-placeholder {
color: red;
}
:-moz-placeholder { /* Firefox 18- */
color: red;
}
::-moz-placeholder { /* Firefox 19+ */
color: red;
}
:-ms-input-placeholder {
color: red;
}
If using javascript, the application of similar styling with vendor prefixes could be done programmatically on a focus event.
Edit: Actually, I don't think these styles can be applied using javascript. Instead, you would need to create a class and apply it using js.
CSS:
input.placeholderred::-webkit-input-placeholder {
color: red;
}
JQuery:
var $textInput = $('#TextField1');
$textInput.on('focusin',
function () {
$(this).addClass('placeholderred');
}
);
$textInput.on('focusout',
function () {
$(this).removeClass('placeholderred');
}
);
JS:
var textInput = document.getElementById('TextField1');
textInput.addEventListener('focus',
function () {
this.classList.add('placeholderred');
}
);
textInput.addEventListener('blur',
function () {
this.classList.remove('placeholderred');
}
);
Special thanks to Armfoot for providing a helpful fiddle: http://jsfiddle.net/qbkkabra/2/