簡體   English   中英

占位符不在chrome中工作

[英]Placeholder not working in chrome

我正在使用剃刀視圖頁面,在日期時間字段中我想顯示占位符,它在Firefox中顯示但不顯示在chrome中顯示 - mm/dd/yyyy

她是我的代碼 -

 @Html.EditorFor(model => model.Date, new { htmlAttributes = new { @class = "form-control form-inline", @placeholder = "Date must be today's or past date" } })

firefox的屏幕截圖

chrome的屏幕截圖

我該如何解決這個問題。

日期類型不支持占位符屬性。 此外,WebKit實現說它已修復。

http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM