HTML5 “placeholder” support

前端 未结 5 1856
傲寒
傲寒 2020-12-18 21:44

How can I find out if the browser supports the HTML5 placeholder tag, so I can decide whether to hook my jQuery placeholder plugin or not.

5条回答
  •  执念已碎
    2020-12-18 22:04

    If you want to include third party libraries like Modernizr and yepnope.js, it's really easy to test for support and progressively enhance, gracefully degrade.

    This is a good article with lots of resources that should help: http://www.sitepoint.com/regressive-enhancement-with-modernizr-and-yepnope/

提交回复
热议问题