how to use HTML5 placeholder attribute with backward-compatibility in mind?

前端 未结 3 1121
后悔当初
后悔当初 2020-12-17 22:54

I\'d like to use HTML5\'s placeholder attribute (You can see it in cation in the newsletter at Thought Results). But when I use older browsers, of course, they don\'t render

3条回答
  •  太阳男子
    2020-12-17 23:23

    @marcgg wrote a great JQuery placeholder plugin that basically replicates the placeholder functionality for those browsers that don't support it.

    https://github.com/marcgg/Simple-Placeholder

    I searched through a lot of placeholder plugins before settling on this one and it works great so far. Originally found it in response to this similar question:

    https://stackoverflow.com/questions/5120257/what-is-the-best-html5-placeholder-like-jquery-plugin-out-there

提交回复
热议问题