当我尝试使用 Ctrl 键选择多行时,所选的边框td
是蓝色的。
我正在使用此代码来检查是否按下了 Ctrl 键:
$("#unSelectedTab td").click(function (event) {
if (event.ctrlKey) {
$(this).toggleClass("backgroundcolor");
}
else {
$("#unSelectedTab td").removeClass("backgroundcolor");
$(this).addClass("backgroundcolor");
}
});