0
<input type="text" id="sample" placeholder="hai"/>

Here how to change the color of placeholder using textbox "id"?

Roy thomas
  • 115
  • 1
  • 8

2 Answers2

0

You can do it using css

Sample CSS

#sample::-webkit-input-placeholder
{
  color:    red;
}

jsfiddle

brk
  • 48,835
  • 10
  • 56
  • 78
0

You have to use css to do this:

input#hai::-webkit-input-placeholder {
    color: red !important;
}

input#hai:-moz-placeholder { /* Firefox 18- */
    color: red !important;  
}

input::-moz-placeholder {  /* Firefox 19+ */
    color: red !important;  
}

input#hai:-ms-input-placeholder {  
    color : red !important;
}
thataustin
  • 2,035
  • 19
  • 18