在Jquery .focus()函数在IE 9中工作正常,但在IE 11&铬 [英] In Jquery .focus() function is working fine in IE 9 but not in IE 11 & Chrome

查看:90
本文介绍了在Jquery .focus()函数在IE 9中工作正常,但在IE 11&铬的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

焦点功能在IE 9中工作正常但在IE 11和Chrome中没有工作



Focus Function is working fine in IE 9 but not in IE 11 and Chrome

show: function () {

            this.resetForm();
            $("input[id*=searchFilters]", this.searchForm).val('');
            this.searchForm.modal("show");
            $('input[name=searchFilters]').focus();
        },


i tried most of the solution 

$(document).ready(function(){
  $('#searchFilters').find('input[type=text],select,textarea').filter(':visible:first').focus();
});


$('#searchFilters').focusout(function() {
    setTimeout(function() {
        $(this).focus();
    }, 0);
});





请给出最佳解决方案此问题



Please give an best solution for this issue

推荐答案

input [id * = searchFilters] this .searchForm).val(' ');
this .searchForm.modal( show );
("input[id*=searchFilters]", this.searchForm).val(''); this.searchForm.modal("show");


' input [name = searchFilters] 。)聚焦();
},


i尝试了大部分解决方案
('input[name=searchFilters]').focus(); }, i tried most of the solution


(document).ready(function(){
(document).ready(function(){


这篇关于在Jquery .focus()函数在IE 9中工作正常,但在IE 11&铬的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆