js+<div>
<%--
Document : display
Created on : 2010-11-13, 8:37:28
Author : sheng
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!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>JSP Page</title>
<script type="text/javascript">
//js动态增加搜索条件
function addQuery(){
var queryName = document.getElementById("queryName").value;
var queryClass = document.getElementById("queryClass").value;
alert(queryName);
alert(queryClass);
queryForm.action="search.do"
queryForm.submit(); //search.do
}
</script>
</head>
<body>
<div id="addQuerys">
<form name="queryForm"
action="search.do" method="POST">
搜索条件:
用户名:<input type="text" name="name" id="queryName">
班 级:<input type="text" name="classname" id="queryClass">
<input type="submit" value="搜索">
</form>
</div>
</body>
</html>
js与div红的代码,深入的涵义,还不清楚.如果高手路过,邀请你踩下