标签:class html count sele 成功 sda sel .com dac
1,url数量,
2,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/xml" prefix="x" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
href="../../user/css/common
性别: <c:if test="${null == condition4Gender.code}"> <input type="radio" name="gender" value="" checked>全选 <input type="radio" name="gender" value="MALE">男 <input type="radio" name="gender" value="FEMALE">女 </c:if>
<%@page import="com.liepin.ycdemo.platform.user.enums.EnumGender" %>
<c:forEach items="${userList}" var="tform" varStatus="count"> <tr> <td class="user-name"> <a href="#">${tform.name}</a> </td> <td>${tform.gender.desc}</td> <td>${tform.phone}</td> <td>${tform.position}</td> <td>${tform.state.desc}</td> <td>${tform.role.desc}</td> <td class="controls"> <a href="/user/admin/show?userId=${tform.id}">修改</a> <a onclick="deleteById(${tform.id})">删除</a> <a href="/user/showAddtional?userId=${tform.id}" data-selector="delete">查看</a> </td> </tr> </c:forEach>
<c:forEach var="i" begin="1" end="${totalPage}" step="1"> <a onclick="index(${i-1},${totalPage})">${i}</a> </c:forEach>
model.addAttribute("condition4Name", name); model.addAttribute("condition4Phone", phone); model.addAttribute("condition4Gender", gender); model.addAttribute("userList", employeeDtoListQuery.getList()); model.addAttribute("rowCount", employeeDtoListQuery.getTotalCount()); model.addAttribute("pageSize", pageSize); model.addAttribute("curPage", curPage); model.addAttribute("totalPage", PageUtil.calTotalPage(pageSize, employeeDtoListQuery.getTotalCount())); return "user/management";
3,html相关
<input type="submit" class="btn btn-save" onclick="index(${userId },${userAddtionalForm.userAddtionalId})" value="提交">
<a onclick="deleteById(${tform.id})">删除</a>
<a href="/user/showAddtional?userId=${userId }" data-selector="delete">取消</a>
<input type="text" id="name" name="name" validate-title="用户姓名" validate-rules="[[‘required‘,‘请输入$‘]]" value="${form.name }">
<c:if test="${‘1‘ == form.gender.code}"> <input type="radio" name="gender" value="MALE" checked>男 <input type="radio" name="gender" value="FEMALE">女 </c:if> <c:if test="${‘2‘ == form.gender.code}"> <input type="radio" name="gender" value="MALE" >男 <input type="radio" name="gender" value="FEMALE" checked>女 </c:if>
<input id="file" type="file" name="file">
<input type="checkbox" name="isAutoLogin" data-selector="checkbox" checked="checked" value="on">
<a onclick="index(${0},${totalPage})"><<</a> <a onclick="index(${curPage-1},${totalPage})">上页</a> <c:if test="${curPage - 2 <= 0 && totalPage<=5}"> <c:forEach var="i" begin="1" end="${totalPage}" step="1"> <a onclick="index(${i-1},${totalPage})">${i}</a> </c:forEach> </c:if> <c:if test="${curPage - 2 <= 0 && totalPage>5}"> <c:forEach var="i" begin="1" end="5" step="1"> <a onclick="index(${i-1},${totalPage})">${i}</a> </c:forEach> </c:if> <c:if test="${curPage - 2 > 0 && curPage + 2<totalPage}"> <c:forEach var="i" begin="${curPage -1 }" end="${curPage + 3}" step="1"> <a onclick="index(${i-1},${totalPage})">${i}</a> </c:forEach> </c:if> <c:if test="${curPage - 2 > 0 && curPage + 2>=totalPage}"> <c:forEach var="i" begin="${totalPage - 4 }" end="${totalPage}" step="1"> <a onclick="index(${i-1},${totalPage})">${i}</a> </c:forEach> </c:if> <a onclick="index(${curPage+1},${totalPage})">下页</a> <a>现在第${curPage+1}页</a> <a onclick="index(${totalPage-1},${totalPage})">>></a> <a>共${rowCount}条记录,${totalPage}页</a>
<textarea id="introduce" name="introduce" style="width:700px;height:200px;"> 杯子在多数时候,盛装的仅仅是半杯水,遇见的那个人依然似乎无法填补内心的空洞,时间一点 一点地过去,水也一点一点地蒸发掉,你开始觉得他越来越无法满足你的全部幻想全部期待,对望的 时候,彼此的眼里充满了空洞犹疑。杯子里面的水终于全部消失。分离是如此容易的一件事,就连曾经 淡淡的水痕都刹那间无影无踪。生活似乎回到了最初的样子,天依旧蓝得透心,城市依旧匆忙得落寞。只 是你不明白,为什么在每一个狂欢之夜,隐藏在人群中望着烟花绽放的夜空,会一边默默地流泪,一边强 作笑颜。你对自己说是因为感动于这绚烂,没错,一切都太绚烂,绚烂得已经让你不知所措,绚烂得已经让 你相信一切希望与期待都未曾出现过。于是决定走开,带着一只空旷而干涸的杯子,有的时候一边走一边疑 惑,世界那么大,为什么那么渺小孤单的一滴雨还是会打在自己的脸庞上呢,人潮汹涌,流走的水再也无法收 集,过去的心境再也无法找寻。有的时候,你在一些奇怪的梦里恍惚地以为曾经的 一汪水,还心满意足地躺在自己杯子里面,只有醒过来的时候才了解,即使是沧海,多年之后也化作了桑田。 </textarea>
4,js相关
var file = $(‘#file‘)[0].files[0]
var introduce = $(‘#introduce‘).val();
var isAutoLogin = $("input[name=‘isAutoLogin‘]:checked").val();
var gender = $("input[name=‘gender‘]:checked").val();
5,策略
var username = $(‘#username‘).val(); var password = $(‘#password‘).val(); var position = $(‘#position‘).val(); var email = $(‘#email‘).val(); var birthday = $(‘#birthday‘).val(); var name = $(‘#name‘).val(); var phone = $(‘#phone‘).val(); var gender = $("input[name=‘gender‘]:checked").val(); if (username == ‘‘ || password == ‘‘ || position == ‘‘ || email == ‘‘ || birthday == ‘‘ || name == ‘‘ || phone == ‘‘ || gender == ‘‘) { alert(‘有信息尚未填写好‘) return; } console.log(username, password, position, email, birthday, name, phone, gender); var formData = new FormData(); formData.append("username", username); formData.append("password", password); formData.append("position", position); formData.append("email", email); formData.append("birthday", birthday); formData.append("name", name); formData.append("phone", phone); formData.append("gender", gender); $.ajax({ url: ‘http://localhost:8080/auth/register.json‘, type: ‘POST‘, //GET data: formData, timeout: 10000, //超时时间 contentType: false,//这里 processData: false,//这两个一定设置为false beforeSend: function (xhr) { }, success: function (data, textStatus, jqXHR) { console.log(data); if (data.data != ‘SUCCESS‘) { alert(data.data) } else { alert("注册成功,跳转到登录页") setTimeout(function() { window.location.href="/auth/login" }, 1000); } }, error: function (xhr, textStatus) { console.log(‘错误‘) console.log(xhr) console.log(textStatus) }, complete: function () { } })
if(userAddtionalId != undefined){ formData.append("userAddtionalId", userAddtionalId); }
if (data.data != ‘SUCCESS‘) { alert(data.data) } else { alert("成功") setTimeout(function() { window.location.href="/user/showAddtional?userId="+ userId }, 1000); }
标签:class html count sele 成功 sda sel .com dac
原文地址:https://www.cnblogs.com/vhyc/p/10567340.html