【问题标题】:Clicking on a radio button sets tab back to beginning of page on Chrome单击单选按钮将选项卡设置回 Chrome 页面的开头
【发布时间】:2016-03-02 20:26:01
【问题描述】:

在 Windows XP 和 Windows 7 上测试 Chrome 23.0.1271.64m

在表单中切换时,如果单击radio 按钮,则选项卡索引将重置,并且从页面顶部开始切换:

<input type="text">
<input type="text">
<input type="radio"><!-- click this radio and hit tab -->
<input type="text">
<input type="text">

IE7-10、Firefox 和 Opera 都从单击的单选按钮处继续跳动。 Chrome 中发生了什么?有什么技巧可以让 Chrome 按预期运行吗?

【问题讨论】:

    标签: forms google-chrome cross-browser browser


    【解决方案1】:

    有点晚了,但还是。

    将页面控件的AutoPostBack 设置为true 会使您在启动回发时失去对任何控件的关注。 您可以在 Page_LoadPage_Init 中指定哪个元素具有焦点,但如果您不这样做,则加载该页面时不会设置任何焦点(也适用于更新面板)。

    为避免这种情况,请确保默认情况下不要应用AutoPostBack(如果您没有),从长远来看,它会为您节省大量工作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-09-20
      • 1970-01-01
      • 1970-01-01
      • 2016-03-11
      • 2012-10-22
      • 2016-11-25
      相关资源
      最近更新 更多