gpt4 book ai didi

javascript - 在 Firefox 中使用 Ctrl 键添加过滤器以选择多行,但在 Chrome 中它工作正常

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:45:41 25 4
gpt4 key购买 nike

当我尝试使用 Ctrl 键选择多行时,所选 td 的边框为蓝色。

我正在使用这段代码来检查是否按下了 Ctrl 键:

$("#unSelectedTab td").click(function (event) {

if (event.ctrlKey) {
$(this).toggleClass("backgroundcolor");
}
else {
$("#unSelectedTab td").removeClass("backgroundcolor");
$(this).addClass("backgroundcolor");
}
});

最佳答案

可能是:事件.浏览器事件.ctrlKey

你应该在 Firebug 中放置一个断点,看看事件有什么属性。

关于javascript - 在 Firefox 中使用 Ctrl 键添加过滤器以选择多行,但在 Chrome 中它工作正常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16516310/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com