画二维表,类似课程表

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<%

String path = request.getContextPath();

%>

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<html>

<head>

<script type="text/javascript">

function show(obj,valu){

obj.innerHTML = "<input type='text' name='name' value='"+ valu +"'>";

}

</script>

</head>

<body>

<form action="">

<table border="1px" width="800px" id="course">

<tr>

<td>

等级\结构

</td>

<c:forEach items="${courseStructureList}" var="courseStructure">

<td onDblClick="show(this,'${courseStructure.name}')">

<input type="hidden" name="name" value="${courseStructure.name}">

${courseStructure.name}

</td>

</c:forEach>

</tr>

 

 

<c:forEach items="${courseKnowledgeBlockList}"

var="courseKnowledgeBlock" varStatus="s1">

<tr>

 

<c:forEach items="${courseGradeList}" var="courseGrade"

varStatus="status">

 

<c:if test="${s1.index==status.index}">

 

<td onDblClick="show(this,'${courseGrade.name}')">

<input type="hidden" name="name" value="${courseGrade.name}">

${courseGrade.name}

</td>

 

<!--<td onDblClick="show(this,'${courseGrade.name}')">

${courseGrade.name}

</td>

-->

</c:if>

</c:forEach>

<c:forEach items="${courseKnowledgeBlock}" var="zhishikuai">

<td onDblClick="show(this,'${zhishikuai.name}')">

<input type="hidden" name="name" value="${zhishikuai.name}">

${zhishikuai.name}

</td>

<!--<td>

${zhishikuai.name}

</td>

-->

</c:forEach>

</tr>

</c:forEach>

</table>

</form>

</body>

</html>

 

你可能感兴趣的:(类)