我正在查看我的同事编写的 javascript,我认为它看起来在两个子句中的作用相同:
function doSubmitOversikt(action, command, status) {
var checked = document.getElementById("klarbox").checked;
if(status && !checked) {
if (confirm("Ärendet är satt som Klar (formell handläggning första delen klar). Vill du verkligen ångra detta? Att ångra kan innebära att ärendet behöver arras om i CICS.")) {
document.actionForm.action.value = action;
document.actionForm.actionCommand.value = command;
document.actionForm.submit();
disableAll();
}
} else {
document.actionForm.action.value = action;
document.actionForm.actionCommand.value = command;
document.actionForm.submit();
disableAll();
}
}
上面的代码和无条件地做有什么区别
document.actionForm.action.value = action;
document.actionForm.actionCommand.value = command;
document.actionForm.submit();
disableAll();
?