简体   繁体   中英

html placeholder attribute in Firefox and IE for both text and password input

I found that does not work in IE and FF. I found some Javascript work arounds but the place holder text on the password would be stared out. I know this works the way it should in Chrome and i think Safari since they are both Webkit. Anyone have any idea or know of a working fix for IE and FF?

Your only workaround would be placing a label on top of the text/password box and hiding it/showing the actual box when it's getting focus. For example, look at this jQuery plugin that will do exactly what you want.

您可以创建一个伪造的密码字段

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM