我这里有问题......
if (currentScreen=="object" && currentItem[1]!=null){
gotoElement(currentItem[0], currentItem[1], true, false, currentScreen);
} else {
loadContent("objectMain.php?objectClass=" + currentItem[0],"centerDiv");
} else {
target=getTargetFromCurrentScreen(currentScreen);
loadContent(target,"centerDiv");
}
enableWidget('menuBarRedoButton');
if (historyPosition == 0) {
disableWidget('menuBarUndoButton');
}
错误是:
"unexpected token else".
有人可以帮助我吗?
最佳答案
你必须使用 else if()
而不是两个 successif else
:
if (first_condition){
} else if(second_condition) {
} else {
}
希望这对您有所帮助。
关于javascript - JS 意外 token 其他,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41167168/