Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/87.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
Javascript IE的占位符修复不';t效应形式字段';s值_Javascript_Jquery_Css_Html - Fatal编程技术网

Javascript IE的占位符修复不';t效应形式字段';s值

Javascript IE的占位符修复不';t效应形式字段';s值,javascript,jquery,css,html,Javascript,Jquery,Css,Html,我的web应用程序包含四个表单字段,用于筛选表。IE的所有HTML5占位符修复将“占位符”替换为“值”,并去除模糊上的值 不幸的是,IE中的“我的表单”字段试图根据“占位符”修复来过滤表 是否存在不影响实际字段值的占位符修复 我推荐,顺便去看看也不错。您可以将其包含在html中,并使用本机的html5占位符api。我推荐,它作为一个插件非常好。您可以将其包含在html中,并使用本机的html5占位符api。我推荐,它作为一个插件非常好。您可以将其包含在html中,并使用本机的html5占位符ap

我的web应用程序包含四个表单字段,用于筛选表。IE的所有HTML5占位符修复将“占位符”替换为“值”,并去除模糊上的值

不幸的是,IE中的“我的表单”字段试图根据“占位符”修复来过滤表


是否存在不影响实际字段值的占位符修复

我推荐,顺便去看看也不错。您可以将其包含在html中,并使用本机的html5占位符api。

我推荐,它作为一个插件非常好。您可以将其包含在html中,并使用本机的html5占位符api。

我推荐,它作为一个插件非常好。您可以将其包含在html中,并使用本机的html5占位符api。

我推荐,它作为一个插件非常好。您可以将其包含在html中,并使用本机html5占位符api。

我以前遇到过同样的问题,所以我自己做了退步

//占位符回退
var testInput=document.createElement('input');
变量占位符支持=(“testInput中的占位符”);
如果(!占位符支持){
$('input[placeholder]')。每个(函数(索引,当前){
var$real=$(本);
变量占位符值=$real.attr(“占位符”);
var类=$real.attr(“类”);
$fakeInput=$(“”).attr({“类型”:“text”}).val(占位符值).addClass('placeholder fake input',classes);
$fakeInput.insertBefore($real);
$real.hide();
$fakeInput.focus(函数(){
$(this.blur().hide())
.next().show().focus();
});
$real.blur(函数(){
if($(this.val()=''){
$(this.hide())
.prev().show();
}
});
});
}

我以前也遇到过同样的问题,所以我自己做了退路

//占位符回退
var testInput=document.createElement('input');
变量占位符支持=(“testInput中的占位符”);
如果(!占位符支持){
$('input[placeholder]')。每个(函数(索引,当前){
var$real=$(本);
变量占位符值=$real.attr(“占位符”);
var类=$real.attr(“类”);
$fakeInput=$(“”).attr({“类型”:“text”}).val(占位符值).addClass('placeholder fake input',classes);
$fakeInput.insertBefore($real);
$real.hide();
$fakeInput.focus(函数(){
$(this.blur().hide())
.next().show().focus();
});
$real.blur(函数(){
if($(this.val()=''){
$(this.hide())
.prev().show();
}
});
});
}

我以前也遇到过同样的问题,所以我自己做了退路

//占位符回退
var testInput=document.createElement('input');
变量占位符支持=(“testInput中的占位符”);
如果(!占位符支持){
$('input[placeholder]')。每个(函数(索引,当前){
var$real=$(本);
变量占位符值=$real.attr(“占位符”);
var类=$real.attr(“类”);
$fakeInput=$(“”).attr({“类型”:“text”}).val(占位符值).addClass('placeholder fake input',classes);
$fakeInput.insertBefore($real);
$real.hide();
$fakeInput.focus(函数(){
$(this.blur().hide())
.next().show().focus();
});
$real.blur(函数(){
if($(this.val()=''){
$(this.hide())
.prev().show();
}
});
});
}

我以前也遇到过同样的问题,所以我自己做了退路

//占位符回退
var testInput=document.createElement('input');
变量占位符支持=(“testInput中的占位符”);
如果(!占位符支持){
$('input[placeholder]')。每个(函数(索引,当前){
var$real=$(本);
变量占位符值=$real.attr(“占位符”);
var类=$real.attr(“类”);
$fakeInput=$(“”).attr({“类型”:“text”}).val(占位符值).addClass('placeholder fake input',classes);
$fakeInput.insertBefore($real);
$real.hide();
$fakeInput.focus(函数(){
$(this.blur().hide())
.next().show().focus();
});
$real.blur(函数(){
if($(this.val()=''){
$(this.hide())
.prev().show();
}
});
});
}
  //place holder fallback 
  var testInput = document.createElement('input');
  var placeholderSupport = ("placeholder" in testInput);

if(!placeholderSupport){
    $('input[placeholder]').each(function (index, current) {
    var $real = $(this);
    var placeHolderValue = $real.attr("placeholder");
    var classes = $real.attr("class");
    $fakeInput = $("<input>").attr({"type": "text"}).val(placeHolderValue).addClass('placeholder fake-input' , classes );

    $fakeInput.insertBefore($real);
    $real.hide();
    $fakeInput.focus(function() {
      $(this).blur().hide()
      .next().show().focus();
    });

    $real.blur(function () {
      if ($(this).val() == '') {
        $(this).hide()
        .prev().show();
      }
    });
  });
}