What browsers support the placeholder html tag for text inputs? Does Internet Explorer support it? (I have a JavaScript placeholder that I can use for the browsers that do not support it.)
<input type=TEXT placeholder="placeholder here" />
If you have an input in your form and placeholder is not showing because a white space at the beginning, this may be caused for you "value" attribute. In case you are using variables to fill the value of an input check that there are no white spaces between the commas and the variables.
Only the subset of CSS properties that apply to the ::first-line pseudo-element can be used in a rule using ::placeholder in its selector. Note: In most browsers, the appearance of placeholder text is a translucent or light gray color by default.
HTML5 is now compatible with all popular browsers (Chrome, Firefox, Safari, IE9, and Opera) and with the introduction of DOCTYPE, it is even possible to have a few HTML features in older versions of Internet Explorer too.
HTML5 includes a placeholder attribute that allows you to declaratively specify this temporary text. This is typically a short length text. It's a quick and easy solution for functionality that's very widely used.
It is currently supported by all major browsers except IE 9 and earlier and Opera mini.
For updates, look at the w3schools-specs Or even better, view this overview.
For anyone interested, this is the jQuery Fallback that I use
I use it with jQuery Validation Engine.
Replace FORMCLASS with the class of your form.
<!-- IF IE - use Placeholder Fallback --> <!--[if lt IE 10 ]> <script> $(".FORMCLASS").find('[placeholder]').each(function(){ $(this).val($(this).attr('placeholder')); $(this).focus(function() { if ($(this).attr('placeholder')==$(this).val()) { $(this).val(''); } }); }); </script> <![endif]-->
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With