不显示HTML5的input type =“ date”字段的占位符。怎么解决呢?
要显示它,请使用以下内容-
<input placeholder = "Date" class = "textbox-n" type = "text" onfocus = "(this.type = 'date')" id = "date">
您也可以使用CSS-
input[type="date"]::before{ color: #ffffff; content: attr(placeholder) ": "; } input[type="date"]:focus::before { content: "" !important; }