Ajax html编辑器在页面加载时自动聚焦 [英] ajax html editor autofocus off on page load

查看:100
本文介绍了Ajax html编辑器在页面加载时自动聚焦的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我在Web应用程序中使用Ajax HTML Editor控件,并且该页面上还有其他控件.

编辑器控件位于第三位.
第一个和第二个是文本框.

现在,当页面加载时,光标焦点会自动设置为Editor控件,即使我在页面加载时将焦点设置在文本框上,并从源头设置Editor控件的属性AutoFocus ="False".
但解决方案仍然较少.

任何人都可以解决这个问题吗?
请帮帮我.
谢谢.adv.

hi all,
I am using Ajax HTML Editor control in my web application and there are also other control on that page.

Editor control is at the 3rd place.
1st and 2nd are textboxes.

Now when the page is load, cursor focus is automatically set to Editor control even i set focus on textbox on page load and set property AutoFocus="False" of Editor control from source.
but still solution less.

anyone have solution on that problem?
please help me out.
thanks in adv.

推荐答案

,您可以从客户端侧重于文本框,即使用jquery的documentready功能或ms ajax pageLoad函数.
you can set focus on text box from client side i.e using jquery''s documentready fuction or ms ajax pageLoad function.


而不是使用背后的代码来设置控件焦点,而是在客户端使用javascript.您不需要jquery或ajax的东西就可以做到这一点,而只需要一些非常简单的基本javascript.
请参阅 http://support.microsoft.com/kb/316719 [
Rather than using the code-behind to set control focus, use javascript on the client side. You don''t need jquery or ajax stuff to make this happen, but rather just some very simple, basic javascript.
See http://support.microsoft.com/kb/316719[^] for details. There are some nice code snippets in here that you should be able to use.


这篇关于Ajax html编辑器在页面加载时自动聚焦的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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