Donate

Placeholder Attribute In HTML5 Not Showing On IE 9 And Below (Watermark Feature)

Given this html markup for input text element for accepting email value:
<input type="email" name="inEmail" id="inEmail" required="required" placeholder="yourname@domain.com" />  
The place holder shows correctly on firefox and google chrome but not on IE 9. After searching the internet, I found placeholder framework that will fix place holders in IE 9 and below.
The steps are as follows:
1. Download the placeholder script here: Placeholder js
2. Add reference to jquery and placeholder on your html file.
 <script src="../Scripts/jquery-1.7.1.min.js" type="text/javascript"></script>  
 <script src="placeholders.jquery.min.js" type="text/javascript"></script>
IE demo:
Placeholder Attribute In HTML5 Not Showing On IE 9 And Below (Watermark Feature)
That's it... :)

Comments

Donate

Popular Posts From This Blog

WPF CRUD Application Using DataGrid, MVVM Pattern, Entity Framework, And C#.NET

How To Insert Or Add Emojis In Microsoft Teams Status Message

Bootstrap Modal In ASP.NET MVC With CRUD Operations