Placeholder not working in IE10

后端 未结 3 1310
粉色の甜心
粉色の甜心 2021-01-16 13:25

html:

3条回答
  •  悲哀的现实
    2021-01-16 13:59

    It sounds like your javascript is breaking the native IE10 placeholder functionality.

    To test this, and hopefully fix it, wrap the javascript you have written for placeholders in a conditional statement, so that it only applies to IE9 and below.

    
    

    Alternatively, there is a very nice jquery plugin by Mathias Bynens that is available for free and handles all of this for you: https://github.com/mathiasbynens/jquery-placeholder

    Some CMSs already have a plugin built using this code. The Wordpress plugin is here: http://wordpress.org/plugins/html5-placeholder-polyfill/

提交回复
热议问题