找传奇、传世资源到传世资源站!

SSM项目入门级源码下载(Spring+SpringMVC+Mybatis框架)

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

实现了 增删改查

<%@ 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>

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复