Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wordpress contact-form7日期选择器IE问题与占位符_Wordpress - Fatal编程技术网

Wordpress contact-form7日期选择器IE问题与占位符

Wordpress contact-form7日期选择器IE问题与占位符,wordpress,Wordpress,我使用wordpress中的contactfor-7 datepicker插件在contact-form7中显示datepicker,它显示了它,但我也在datepicker显示的字段中使用了占位符。但问题是它在所有浏览器中都可以正常工作,但在ie 7,8,9占位符中不能正常工作,但datepicker也可以打开,但显示的值未定义(日历不显示)。对于解决方案,我只在ie中输入文本字段值null。问题是ie采用占位符值。显示placehode条件代码的脚本如下: $(document).ready

我使用wordpress中的contactfor-7 datepicker插件在contact-form7中显示datepicker,它显示了它,但我也在datepicker显示的字段中使用了占位符。但问题是它在所有浏览器中都可以正常工作,但在ie 7,8,9占位符中不能正常工作,但datepicker也可以打开,但显示的值未定义(日历不显示)。对于解决方案,我只在ie中输入文本字段值null。问题是ie采用占位符值。显示placehode条件代码的脚本如下:

$(document).ready(function(){   
if(!Modernizr.input.placeholder){
  $('[placeholder]').focus(function() {
   var input = $(this);
   if (input.val() == input.attr('placeholder')) {
     input.val(''); 
   }
  })
  $('[placeholder]').blur(function() {
  var input = $(this);
  if (input.val() == '' || input.val() == input.attr('placeholder') ) {
var ver = getInternetExplorerVersion(); 
//getInternetExplorerVersion() is the function to chek the ie browser
    if ( ver> -1 )
    {
      if ( ver== 8.0 )
         input.val('');
      else if ( ver == 7.0 )
          input.val('');
      else if ( ver == 6.0 )
         input.val('');
    }else{
   input.val(input.attr('placeholder'));
    }
}
 }).blur();
 $('[placeholder]').parents('form').submit(function() {
  $(this).find('[placeholder]').each(function() {
    var input = $(this);
    if (input.val() == input.attr('placeholder')) {
      input.val('');
    }
  })
 });
}

});

请检查Jquery中是否存在冲突?可能您正在加载多个Jquery