Step 2:
<Form name = "form1" Action = "http://jlpt.etest.net.cn/bkServlet" method = "Post" target = "Main"> // target webpage
Level & nbsp; <select name = "lstjb" size = "1" onchange = "updatedata ()" class = "v10bk" style = "width: 80 "> // note the corresponding lstjb
<Option value = "1"> Level 1 </option>
<Option value = "2"> Level 2 </option>
<Option value = "3" selected> Level 3 </option>
<Option value = "4"> Level 4 </option>
</SELECT>
Test site: <br>
<Input type = "button" value = "Dalian University of Technology" name = "btnthird1" onclick = "gothird1 ()" class = "v10bk" style = "width: 70 "> & nbsp; <input type =" button "value =" Dalian Emy of foreign languages "name =" btnthird2 "onclick =" gothird2 () "Class =" v10bk "style =" width: 85 "> <br>
<Input type = "button" value = "Liaoning Normal University" name = "btnthird3" onclick = "gothird3 ()" class = "v10bk" style = "width: 70 "> & nbsp; <input type =" button "value =" "name =" btnthird4 "onclick =" gothird4 () "Class =" v10bk "style =" width: 85 "> <br>
<Input class = "v10bk" type = "button" value = "show all schools in the window" name = "btnsecond" onclick = "gosecond ()" style = "width: 160 ">
<TD class = "v10bk"> test site Code <input name = "kddm" class = "v10bk"> <br>
Test site name <input name = "kdmc" class = "v10bk"> <br>
Test level <input name = "level" class = "v10bk"> <br>
Level name <input name = "jbmc" class = "v10bk">
<Input type = "Submit" value = "select this test room" name = "btnsubmit" class = "v10bk" onclick = "Return validateform ()">
// Update
Function updatedata (){
Try {
JB = form1.lstjb. Options [form1.lstjb. selectedindex]. value;
}
Catch (e ){
JB = 3;
}
If (JB = 1 ){
Level = 1;
Jbmc = "Japanese level 1 ";
}
Else if (JB = 2 ){
Level = 2;
Jbmc = "Japanese level 2 ";
}
Else if (JB = 3 ){
Level = 3;
Jbmc = "Japanese level 3 ";
}
Else {
Level = 4;
Jbmc = "Japanese level 4 ";
}
Form1.level. value = level;
Form1.jbmc. value = jbmc;
}
Updatedata ();
}
// Select a school
Function gothird1 (){
Updatedata ();
Form1.kddm. value = "1020403 ";
Form1.kdmc. value = "School of Foreign Languages, Dalian University of Technology ";
}
Function gothird2 (){
Updatedata ();
Form1.kddm. value = "1020401 ";
Form1.kdmc. value = "Dalian Institute of Foreign Languages Test Center ";
}
Function gothird3 (){
Updatedata ();
Form1.kddm. value = "1020402 ";
Form1.kdmc. value = "Test Center of Academic Affairs Office of Liaoning Normal University ";
}
Function gothird4 (){
Updatedata ();
Form1.kddm. value = "1020601 ";
Form1.kdmc. value = "Academic Affairs Office of Liaoning University ";
}
// Determine whether something is not selected
Function validateform (){
If (form1.kddm. value = "") |
(Form1.kdmc. value = "") |
(Form1.level. value = "") |
(Form1.jbmc. value = "")){
Alert ("Enter detailed data! ");
Return false;
}
Return true;
}