Skip to content

Latest commit

 

History

History
9 lines (7 loc) · 697 Bytes

input-placeholder.md

File metadata and controls

9 lines (7 loc) · 697 Bytes

feature: input[placeholder] status: use tags: gtie9 kind: html polyfillurls:Placeholder jQuery Plugin

Input placeholders are simply ignored in IE 9 and below. Note that they are only applied when the type of the input is text, password, search, tel, url, or email. Textareas can have placeholders, too. Otherwise, it is ignored.

input[placeholder] is commonly the first polyfill anyone writes and, as such, there are many of them. Password inputs and submit event clearing are among many of the gotchas that catch naive implementations; Mathias's polyfill below handles these cases very well.