I know that Internet Explorer doesn't support the placeholder attribute for input tags, but surely in 2012 there must be another solution for IE?
相关问题
- How to fix IE ClearType + jQuery opacity problem i
- Adding a timeout to a render function in ReactJS
-
Why does the box-shadow property not apply to a
- Add animation to jQuery function Interval
- Is TWebBrowser dependant on IE version?
Actually, IE does support the placeholder attribute in 2012 (Version 10). Couple this with a polyfill for older browsers, and you should have a well-rounded solution to your problem.
Try this jQuery plugin developed by me
https://github.com/ramsunvtech/jQuery-Plugins/tree/master/IEPlaceHolder
http://the.deerchao.net/PlaceHolder it works on ie without call any function...
I wrote a jQuery plugin a while back that will add placeholder support to any browser that does not support it.
Placeholder Text in IE
Yes, there is a quite easy solution for IE8 and IE9 because on grater versions of IE it already works. (IE10, IE11, etc)
This is the solution i found:
1. Detect Internet Explorer version
2. Fix the placeholder
We've been using this jQuery plugin in production for a few weeks now and it seems to be working great.
http://webcloud.se/code/jQuery-Placeholder/