I've been searching online without any luck so far. I'm attempting to change the placeholder color of a text box using JavaScript, but I'm not sure how to go about it. I already have a color picker that changes colors.
If my CSS looks something like this, how can I update it?
::placeholder {
color: red;
}
<input placeholder="placeholder" />
Is there a JavaScript command for making this change? Something along the lines of:
document.getElementById('text').style.placeholderColor = newColor;