Q:

How to change placeholder color on click event?

Please check this code, and tell me what I'm missing,
   I just want to change the color of placeholder after clicking on a button. but I can't 
   figure it out what's wrong.
function makeid() {
var text = "";
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
for (var i = 0; i < 5; i++)
text += possible.charAt(Math.floor(Math.random() * possible.length));
return text;
}

$(".submit_btn").click(function()
{
    if($(".txt_style").text()!="")
    {
    alert(makeid());
    }
    else
    {
    $(".txt_style").attr("placeholder", "Please enter your email address");
    $('input::-webkit-input-placeholder').css("color", "red");
    }
});

A:

You can't really modify pseudo-selectors with JavaScript. You'll have to modify an existing a  element.
If possible, make a class:
.your-class::-webkit-input-placeholder {
    color: #b2cde0
}

And add it to the element:
 $('input').addClass('your-class');

