index.jspこのリンクhttps://www.dropbox.com/s/0smy7nlcmilkqt4/index.jspで利用可能なページがあります。
このファイルには、という名前のJavaScriptメソッドが含まれており、validateloginForm()入力フィールドの検証に使用されます。
フィールドが入力されている場合、別のJSPページにリダイレクトされますが、alert("after");行の下のwindow.open()行を削除すると、別のページにリダイレクトされません。
alert("after")に電話した後、なぜこれが必要なのか教えてくださいwindow.open()。
function validateloginForm()
{
var empId = document.getElementById("empId").value;
var empPass = document.getElementById("empPass").value;
if( empId == "" )
{
alert("Enter id !");
}
else if( empPass == "" )
{
alert("Enter password !");
}
else
{ window.open("validateUser.jsp?"+"empId="+empId+"&empPass="+empPass,"_parent","","");
alert("after");
}
}