無法通過驗證我的提交按鈕路由到此HTML頁面... 罪魁禍首-----------------> return true; window.location.href =「Info/index.html」;返回true; NOT路由到鏈接
function validate()
{
if(document.myLogIn.user_id.value == "")
{
alert("Please provide your Customer ID!");
document.myLogIn.user_id.focus() ;
return false;
}
if(document.myLogIn.password.value == "")
{
alert("Please provide your Password!");
document.myLogIn.password.focus() ;
return false;
}
return true; window.location.href= "Info/index.html";
}
你試過把'window.location.href =「Info/index.html」';返回聲明之前? –
是的,遺憾的是沒有工作... –