Emulation placeholder in older browsers that do not support html5.
placeholder.js uses paradigm "Unobtrusive JavaScript". The example in the file example.html.
For styling, use class -js-placeholder
.-js-placeholder{
color: red;
font-style: italic;
}
If the input dynamic creation, then use the function placeholderIni(input);
var newInput = document.createElement('input');
newInput.setAttribute('placeholder', 'example dynamically input');
// initialization placeholder for the new input
placeholderIni(newInput);
More detailed information in the file example.html