Html Placeholder Browser Compatibility
Solution 1:
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.
Solution 2:
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.
<!-- IFIE - use PlaceholderFallback -->
<!--[if lt IE10 ]>
<script>
$(".FORMCLASS").find('[placeholder]').each(function(){
$(this).val($(this).attr('placeholder'));
$(this).focus(function() {
if ($(this).attr('placeholder')==$(this).val()) {
$(this).val('');
}
});
});
</script>
<![endif]-->
Solution 3:
Firefox also supports it since 4.0
Solution 4:
IE is not supporting placeholders
I feel this code better and it works in all major browsers
<inputid="example-email"type="text" value="Email Address" onfocus="if(this.value === 'Email Address') this.value = '';" onblur="if(this.value === '') this.value = 'Email Address';" name="example-email">
Solution 5:
Question may have been answered a few years ago, but I found it today doing a search.
Since a good reference and pics were not provided before, I am updating this question with both.
HTML5 placeholder Attribute basically says:
The placeholder attribute is supported in all major browsers, except Internet Explorer.
FYI: This includes IE9.
Post a Comment for "Html Placeholder Browser Compatibility"