【问题标题】:How to apply some js to gxt element?如何将一些js应用于gxt元素?
【发布时间】:2013-03-07 13:34:37
【问题描述】:

在几个浏览器中,我在单选按钮周围设置了正方形。我设法使用 javascript:onfocus="this.blur()" 解决了它,但我的网络应用程序是用 gwt 和 gxt 构建的,我不知道如何将它应用到我的 Radio button;

【问题讨论】:

  • 在 CSS 中试试这个:input, input[type="radio"] {border: 0; outline: none;}
  • 同时从你关注的元素中移除焦点听起来像是一个错误的做法,尤其是当你想要通过元素标签时
  • 我已经试过了: input[type="radio"] { outline: none !important;边框:0px!重要;大纲样式:无!重要; } 但 id 没有帮助。我在 ubuntu 上的 Firefox 中还有一个正方形
  • 好的,我解决了它只是将焦点设置到其他元素

标签: javascript gwt radio-button gxt


【解决方案1】:

您可以通过将false 传递给setFocus 方法来删​​除focus

button.setFocus(false);  

this

【讨论】:

  • 我使用的是 GXT 单选按钮,而不是 GWT。
  • 它没有设置焦点方法??
  • 不,它有 setBorders();但这无济于事
  • 在 css 中尝试过这样的 .ext-gecko *:focus { outline-style: none !important; }??
  • 是的,我做到了,但没有帮助
猜你喜欢
  • 2021-07-23
  • 2021-03-30
  • 2013-02-24
  • 1970-01-01
  • 2012-08-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-01-20
相关资源
最近更新 更多