//如果返回值未定義,那麼它必須是「取消」。請提供有關此問題的任何有用信息。 當我們嘗試在返回流中在IE11瀏覽器中啓動jsp頁面時發生此問題。如何在IE11中添加未定義或引用屬性
//if the return value is undefined, then it must be "cancel"
if (typeof returnValue == "null") {
document.getElementById("user").value = "cancel";
} else {
//set value of various form elements, based on returnValue
}
postCommand(null, "redirect", "serversideredirect", "", "");
}
</script>
這意味着你想到居然存在一個元素沒有。你的代碼應該檢查來自'getElementById()'的返回值不是'null'。 – Pointy 2014-12-02 15:09:03