第一種解決方法:IE,火狐瀏覽器,不支持input date的日歷功能,火狐支持日歷功能 ie,火狐,谷歌顯示placeholder屬性
css代碼
#dateofday:before{ color:#808080; content:attr(placeholder); -webkit-appearance:textarea}
html代碼
<input type="date" runat="server" placeholder="Birth Of Day" id="dateofday" onfocus="this.removeAttribute('placeholder')" onblur="this.setAttribute('placeholder','Birth Of Day')" />
onfocu后: onblur后:

第二種解決辦法:ie瀏覽器報錯 火狐不支持日歷功能 谷歌支持日歷功能, 火狐和谷歌顯示placeholder屬性
<input type="text" placeholder="Date Of Day" onfocus="(this.type='date')" onblur="(this.type='text')" />
onfocus后: onblur后:
第三種解決方法:ie 火狐,谷歌,移動端都支持placeholder屬性,但是只有移動端和谷歌有日歷功能
<input type="text" placeholder="Date Of Day" onfocus="this.setAttribute('type','date')" onblur="this.setAttribute('type','text')" />
