InternetExplorer中的jQuery焦点
我有一个搜索字段的输入类型文本,我正在使用jQuery和Focus,但它在InternetExplorer中不起作用,我想知道我的代码中是否有错误,或者是否有更好的方法?谢谢你的帮助!谢谢InternetExplorer中的jQuery焦点,jquery,Jquery,我有一个搜索字段的输入类型文本,我正在使用jQuery和Focus,但它在InternetExplorer中不起作用,我想知道我的代码中是否有错误,或者是否有更好的方法?谢谢你的帮助!谢谢 $(document).ready(function(){ $("#search12_176db646136e9421c49d1b").focus(); }); #search12_176db646136e9421c49d1b标识输入标记的标识。尝试以下操作: document.getElementBy
$(document).ready(function(){
$("#search12_176db646136e9421c49d1b").focus();
});
#search12_176db646136e9421c49d1b
标识输入标记的标识。尝试以下操作:
document.getElementById('search12_176db646136e9421c49d1b').focus();
$(document).ready(function(){
setTimeout(function() {
$("#search12_176db646136e9421c49d1b").focus();
},1000);
});
或
这里
类似于
document.getElementById('search12_176db646136e9421c49d1b')
试试这个:
$(document).ready(function(){
setTimeout(function() {
$("#search12_176db646136e9421c49d1b").focus();
},1000);
});
或
这里
类似于
document.getElementById('search12_176db646136e9421c49d1b')
很好,很好