基本信息
源码名称:SSM项目入门级源码下载(Spring+SpringMVC+Mybatis框架)
源码大小:26.83M
文件格式:.zip
开发语言:Java
更新时间:2017-11-11
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 2 元×
微信扫码支付:2 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
实现了 增删改查
实现了 增删改查
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() "://" request.getServerName() ":" request.getServerPort() path "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.2.min.js"></script>
<link rel="stylesheet" href="<%=path %>/css/index2.css" type="text/css"></link>
<script type="text/javascript" src="<%=path %>/My97DatePicker/WdatePicker.js"></script>
</head>
<script type="text/javascript">
$(function(){
$.ajax({
url:"<%=path%>/student/queryad.do",
dataType:"json",
type:"post",
success:function(obj){
var alist=obj.alist;
alert(alist);
for ( var i in alist) {
$("#aid").append("<option value='" alist[i].aid "'>" alist[i].aname "</option>");
}
}
});
});
function add(){
$.ajax({
url:"<%=path%>/student/add.do",
data:$("form").serialize(),
dataType:"json",
type:"post",
success:function(obj){
if(obj.code=='success'){
alert("添加成功!");
location.href="<%=path%>/student/list.do";
}else{
alert("添加失败!");
}
}
});
}
</script>
<body>
<form>
<table>
<tr>
<th>
名称:<input type="text" name="name" id="name"/>
</th>
</tr>
<tr>
<th>
生日:<input type="text" readonly="readonly" name="birthday" id="birthday" onclick="WdatePicker()"/>
</th>
</tr>
<tr>
<th>
地址:
<select id="aid" name="aid">
</select>
</th>
</tr>
<tr>
<th>
<input type="button" value="添加" onclick="add()"/>
</th>
</tr>
</table>
</form>
</body>
</html>