要显示它,请使用以下内容-
<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; }