在jsp站点上创建动态课程地图

时间:2012-05-03 10:24:02

标签: javascript html jsp graphics

我必须为作业做这件事。

要求是: 这是所有四年的学生课程信息页面 2.所有课程将每年按列显示 3.每个课程/单元应显示其下属课程的链接,或者每当学生点击课程时,它应显示其连续下一课程的链接 4.这意味着每门课程都应该显示其前提课程的链接 5.如果没有先决条件,则没有链接 6.这一切都需要动态完成

我有一个jsp / html网站,我将包含此页面。你能否建议我如何做到这一点。例如:我可以用什么语言在jsp站点中绘制箭头链接或映射。

非常感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

 <HTML><HEAD><TITLE>Dynamic Form</TITLE></HEAD>
 2: <BODY>
 3: <B>Form</B>
 4: <FORM ACTION=dynamicForm.jsp METHOD=POST>
 5: <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
 6: <%  String[] textFields = {"FirstName","LastName","Address","City","Zip"};
 7:     for(int j=0; j<textFields.length; j++){     %>
 8:     <TR>    <TD> <%=textFields[j]%>:                       </TD>
 9:             <TD> <INPUT TYPE=TEXT NAME=<%=textFields[j]%>> </TD>
10:     </TR>
11: <%  }   %>
12:     <TR>    <TD> State  </TD>
13:             <TD> <SELECT NAME=State>
14: <%  String[] states = {"AZ", "CA", "NM", "MA", "ME", "MD", "..."};
15:     for(int s=0; s<states.length; s++) {    %>
16:                     <OPTION><%=states[s]%></OPTION>
17: <%  }   %>
18:                  </SELECT></TD>
19:     </TR>
20:     <TR>    <TD> Card Number  </TD>
21:             <TD> <INPUT TYPE=TEXT NAME=cNumber></TD>
22:     </TR>
23:     <TR>    <TD> Card Type  </TD>
24:             <TD> <SELECT NAME=CardType>
25: <%  String[] cTypes = {"Amex", "Visa", "Master Card", "Discovery", "..."};
26:     for(int t=0; t<cTypes.length; t++) {    %>
27:                     <OPTION><%=cTypes[t]%></OPTION>
28: <%  }   %>
29:                  </SELECT></TD>
30:     </TR>
31:     <TR>    <TD> Expiration Date (MM/DD/YYYY) </TD>
32: <TD> <INPUT TYPE=TEXT NAME=cMonth SIZE=2><INPUT TYPE=TEXT NAME=cDay SIZE=2>
33:             <SELECT NAME=cYear>
34:             <%  int startYear = 2000;
35:                 int endYear = 2010;
36:                 for(int y=startYear; y<endYear; y++) {    %>
37:                     <OPTION><%=y%></OPTION>
38:             <%  }   %>
39:             </SELECT></TD>
40:     </TR>
41: </TABLE>
42:     <INPUT TYPE=SUBMIT VALUE=Submit>
43: </FORM>
44: <HR>
45: <B>Form Content</B><BR>
46: <TABLE>
47: <%  Enumeration parameters = request.getParameterNames();
48:     while(parameters.hasMoreElements()){
49:         String parameterName = (String)parameters.nextElement();
50:         String parameterValue = request.getParameter(parameterName); %>
51:         <TR>
52:             <TD><%=parameterName%></TD>
53:             <TD><%=parameterValue%></TD>
54:         </TR>
55: <%  }   %>
56: </BODY></HTML>