我希望我的(ExtJS)工具栏按钮在被点击时不抓取网页上的焦点,而是在保持点击不变的情况下执行它们的功能。如何做到这一点?
所有这些答案都很糟糕。这里有一个非常出色的技巧,只使用CSS
<button type="submit" disabled>
<span>Submit</span> <!-- the <span> is the secret -->
</button>
现在在你的CSS中:
button[disabled] > * {
pointer-events: none;
}