 <p>Look with this post's answer to do it in CSS : <a href="http://stackoverflow.com/questions/2610497/change-an-inputs-html5-placeholder-color-with-css">Change an input&#39;s HTML5 placeholder color with CSS</a></p> <p>Then, you can include the <strong>CSS</strong> rule with <strong>javascript</strong>.</p> <p>And you just have to use pseudo-class <code>:hover</code> for the <em>mouseover</em>.</p> <p>Just like that :</p> <p><strong>CSS</strong></p> <pre><code>input.formInvalid::-webkit-input-placeholder { color: red; } </code></pre> <p><strong>Javascript</strong></p> <pre><code>document.getElementById("yourElementId").className += " formInvalid"; //add the class .formInvalid to your element </code></pre>