function update() {
if($("#form1").valid()) {
$.ajax({
url: '${pageContext.request.contextPath}/stu/updateStu.do',
type: 'post',
data: $("#form1").serialize(),
dataType: 'json',
success: function (data) {
if (data.flag){
layer.open({
content:"修改成功!",
area:['300px','150px'],
offset:['200px','400px'],
time:1000,
});
setTimeout(show,15000);
}else{
layer.open({
content:"修改失败!",
area:['300px','150px'],
offset:['200px','400px'],
time:1000,
});
}
}
})
}
}
function show(){
window.parent.document.location.href="${pageContext.request.contextPath}/view/student/student.jsp";
}
layer的使用
最新推荐文章于 2023-10-23 23:28:15 发布