ajax分页迭代显示不同行数跳转下一页mysql+spring+ajax
话不多说,直接上代码。。。
equip_monitor.jsp
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>设备监测</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript" src="../js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="../js/Calender.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#sect').blur(function() {
var sel = document.getElementById('sect').value;
setline(sel)
})
})
function setline(line) {
$.ajax({
type : "post",
url : '${pageContext.request.contextPath}/equip/changeline.action',
data : "line=" + line,
success : function(data) {
}
});
}
</script>
</head>
<body id="body">
<form action="getDate.jsp">
搜索:<input type="text">
<button type="submit">点击搜索</button>
</form>
<form name="date" method="post" action="getDate.jsp">
<select name="year">
</select>年 <select name="month">
</select>月 <select name="day">
</select>日
<button type="submit">提交查询</button>
</form>
<br> 显示数据行数:
<select name="option" id="sect">
<option value="10">10</option>