0
Placeholder on web browser
there is any way to make work the placeholder input attribute on internet explorer?
2 Answers
+ 15
Placeholder is an attribute of input type text, email, password and few more.
It is used to tell user what and how to enter the data in the field.
It might not work on few browser versions of IE, or older browser and there is no alternative for that
+ 3
You can avoid the html5 'placeholder' attribute, and handle one by yourself... example of implementation process:
- put your placeholder text in the 'value' attribute, and style your <input> to a placeholder color/style
- write a JS function to handle the 'oninput' event, where you compare the text inside the <input> 'value' attribute to your placeholder text and set/unset the placeholder class previously defined
[edit]
You can/must improve it by deleting the 'value' content 'onclick' or 'onfocus', and fill it with the placeholder text when content is empty...