0
無法在包含div的標籤(id =「center」)之後鍵入textarea內部?無法在包含div的選項卡中鍵入textarea內部?
這裏是代碼...
<div id="north">North</div>
<div id="west">West</div>
<div id="center"><textarea></textarea></div>
腳本
$(document).ready(function() {
var divs = ["north", "west", "center"];
var startIndex = 0;
$(document).keydown(function(e) {
if (e.which == 9) {
$("div").css("border", "");
$("#" + divs[startIndex]).css("border", "4px solid gray");
startIndex++;
if (startIndex === divs.length) {
startIndex = 0;
}
}
return false;
});
});
你有所有keydown的返回false除了一..這就是爲什麼 –
感謝Wirey,所以我如何解決它? –
刪除返回false ..應該修復它 –