我有一个非常基本的表单,如果表单有效,我想在单击提交按钮后显示加载图像,然后显示操作页面。这是验证的javascript代码:
<script type="text/javascript">
function validateForm()
{
valid = true;
if(document.grades.fullName.value == "")
{
alert ("Please fill out your Full Name.");
valid = false;
}
if(document.grades.idNo.value == "")
{
alert ("Please fill out your ID Number.");
valid = false;
}
if(document.grades.pCS.value == "")
{
alert ("Please fill out your grade for Prelim Class Standing.");
valid = false;
}
if(document.grades.pExam.value == "")
{
alert ("Please fill out your grade for Prelim Examination.");
valid = false;
}
if(document.grades.mCS.value == "")
{
alert ("Please fill out your grade for Midterm Class Standing.");
valid = false;
}
if ( document.grades.mExam.value == "" )
{
alert ("Please fill out your grade for Midterm Examination.");
valid = false;
}
if(document.grades.fCS.value == "")
{
alert ("Please fill out your grade for Finals Class Standing.");
valid = false;
}
if(document.grades.fExam.value == "")
{
alert ("Please fill out your grade for Finals Examination.");
valid = false;
}
return valid;
}
</script>
请有人告诉我如何完全。