关于JS的问题
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>课程添加情况</title>
<script type="text/javascript">
function Change()
{
//alert("haha");//能响应
//System.out.println("qian1");//不能响应
document.getElementById("caozuo").value = "change";
//System.out.println("qian");
//$("#caozuo").value("change");
//verform.submit();
//System.out.println("hou");
}
function Delete(){
//alert("hehe");
//$("#caozuo").value("delete");
document.getElementById("caozuo").value = "delete";
//verform.submit();
}
</script>
</head>
<body>
<form name="verform" action="cad" method="post">
<table border="1" width="500" bordercolor="lightblue">
<tr align="center" bordercolor="lightblue">
<td>课程名称</td>
<td>上课班级</td>
<td>任课教师</td>
<td>助教信息</td>
<td>选课人数</td>
<td>指导教材</td>
</tr>
<c:forEach items="${ classlist }" var="result">
<tr bordercolor="lightblue">
<td>
${ result.getClassName() }
</td>
<td>
${ result.getClassNumber() }
</td>
<td>
${ result.getTeacherName() }
</td>
<td>
${ result.getAssistantName() }
</td>
<td>
${ result.getStudentNumber() }
</td>
<td>
${ result.getTextBook() }
</td>
<td>
<input type="hidden" name="hiddenid" value="${result.getId()}"/>
<input type="hidden" name="caozuo"/>
<input onclick="Change()" type="button" name="xiugai" value="reset"/>
</td>
<td>
<input type="button" name="shanchu" value="delete" onclick="Delete()"/>
</td>
</tr>
</c:forEach>
</table>
</form>
</body>
</html>
这个程序为什么不会响应verform.submit()?输出语句也不响应。如果将type由button改成submit,就会执行该表单的servlet,但是没有获得caozuo的有效值