专注于在Firefox中工作,但没有在chrome中工作 [英] focus work in firefox but not worked in chrome

查看:58
本文介绍了专注于在Firefox中工作,但没有在chrome中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好先生,

i希望在页面加载时使用焦点('itemcode')

并且我们正常使用我使用的脚本作为

............

 $(itemcode)。focus(); 

settimeout(function(){
$(itemcode)。focus();
});

$(itemcode)。focus();

settimeout(function(){
$(itemcode)。focus();
});



问题=

焦点完全在firefox中工作

但它没有在chrome中工作

在页面加载时我可以在文本框中看到光标一秒钟,立即焦点将被删除...

请给我一个支持所有浏览器的解决方案

提前谢谢..

解决方案

(itemcode)。focus();

settimeout(function(){


(itemcode)。focus();
});


( itemcode)聚焦();

settimeout(function(){


hello sir,
i want to use focus on ('itemcode') on page load
and as we normaly use i used script as
............

$("itemcode").focus();
or
settimeout(function(){
      $("itemcode").focus();
});

$("itemcode").focus();
or
settimeout(function(){
      $("itemcode").focus();
});


problem =
focus completely worked in firefox
but its not worked in chrome
in chrome on page loading i can see curser in textbox for a second and immediately focus will be removed...
please give me a solution which support in all browsers
thank you in advance..

解决方案

("itemcode").focus(); or settimeout(function(){


("itemcode").focus(); });


("itemcode").focus(); or settimeout(function(){


这篇关于专注于在Firefox中工作,但没有在chrome中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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