![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
point
JabinJava
这个作者很懒,什么都没留下…
展开
-
JSP分页
显示效果:后端代码://总页数 int totalPage = 1; if (totalRow>pageSize) { //总条数大于每页条数时,总页数为他们相除的结果向上取整 totalPage = (int) Math.ceil(totalRow*1.0/pageSize); } int startPage=1;//起始页 int endPage=5...原创 2019-01-25 11:17:38 · 138 阅读 · 0 评论 -
springboot 定时任务
启动类注解@EnableScheduling@SpringBootApplication@EnableSchedulingpublic class Application { public static void main(String[] args) { SpringApplication.run(Application.class, args); }}定时任务方法注解...原创 2019-07-04 10:47:34 · 106 阅读 · 0 评论 -
单击按钮文件上传
<button id="uploadExcel" onclick="uploadExcel()"> 上传文件</button><script> /*导入Excel*/ function uploadExcel() { /*#load:为按钮,点击后生成一个隐藏的input file标签*/ ...原创 2019-04-25 16:51:22 · 6308 阅读 · 0 评论 -
Layui通用弹层
/*弹层*/function layer_open(title,url,w,h){ if (title == null || title == '') { title=false; }; if (url == null || url == '') { url="404.html"; }; if (w == null || w == '') { w=800; }; if ...原创 2019-05-05 09:32:21 · 146 阅读 · 0 评论 -
Thymeleaf遍历选中多个复选框
使用场景:用户角色一对多关联关系<!-- roleList:所有角色信息 ;userRoleList:用户已有角色id列表--><input th:each="role:${roleList}" type="checkbox" th:value="${role.id}" th:checked="${#lists.contains(userRoleList, role.id...原创 2019-05-05 09:27:12 · 4903 阅读 · 6 评论 -
js:按钮倒计时可点击
function intervalClick(){ var t = 30;//设定倒计时的时间 (秒) $("#btn-code").css("pointer-events","none");//点击后设为不可点击状态 var interval = setInterval(function() {//计时器 if (t <= 0){ $("#btn...原创 2019-04-21 17:22:58 · 1722 阅读 · 0 评论 -
用英文逗号替换中文逗号
在input内添加事件: onkeyup="javascript:this.value=this.value.replace(/,/ig,',')原创 2019-03-22 21:39:43 · 2971 阅读 · 1 评论 -
table中文本显示超出表格自动隐藏
在table标签加入 style="table-layout: fixed在对应td上加入style="text-overflow:ellipsis;white-space:nowrap;overflow:hidden;"如下:<table style="table-layout: fixed"> <td width="10%" style="...原创 2019-03-13 14:42:37 · 1359 阅读 · 0 评论 -
javaweb项目中使用markdown编辑器插件Editor
Editor官网下载插件,地址: https://pandao.github.io/editor.md将下载的文件解压,得到完整包将examples文件夹中静态资源资源文件(css,js,image)导入项目另外在外层文件中将依赖的plugins、lib、fonts文件夹一并导入,在images文件夹中找到loading.gif,以及editormd.min.js文件...原创 2019-03-10 10:32:30 · 4290 阅读 · 6 评论 -
mysql全文检索
由于MYSQL搜索对于中文来说不太理想,因此借由第三方插件来完成搜索任务。 在MySQL 5.7.6中我们使用一个新的全文索引插件来处理它们:ngram parser.建立全文检索:ALTER TABLE t_name ADD FULLTEXT INDEX fulltext_name (col1, col2) WITH PARSER ngram;用中文检索分词插件ngra...原创 2019-03-10 09:43:18 · 338 阅读 · 0 评论 -
页面原样返回上一页
location.href = document.referrer原创 2019-03-14 11:30:49 · 2444 阅读 · 0 评论 -
MyBatis注解方式@Insert插入一条数据后获取自增id
使用注解:@Options(useGeneratedKeys=true,keyColumn=“id”)package mapper;import org.apache.ibatis.annotations.Insert;import org.apache.ibatis.annotations.Mapper;import org.apache.ibatis.annotations.Opti...原创 2019-02-15 16:29:52 · 10419 阅读 · 1 评论 -
jquery.validate.js表单验证
引入js文件<script src="js/jquery-1.8.3.min.js"></script><script src="js/jquery.validate.min.js"></script><!-- 自定义校验方法 --><script src="js/jquery.validate原创 2019-02-15 16:21:45 · 178 阅读 · 0 评论 -
数组去重
function handle(arr) { //数组去重 let _arr=[],_arrIds=[]; for(let i=0;i<arr.length;i++){ 原创 2019-01-23 08:28:43 · 120 阅读 · 0 评论 -
iframe基础
基本结构: <iframe id="iframe_id" src="i.html" name="iframe_name" frameborder="1" height="80%" width="100%" scrolling="auto"> <p>Your browser does not suppo原创 2019-01-25 14:04:37 · 176 阅读 · 0 评论 -
maven仓库引入外部jar包
打开cmd.exe(win+R,输入cmd。注意:不能在资源管理器右键打开powershell操作,会报错),输入以下指令:【Dfile=jar包文件路径】 mvn install:install-file -Dfile=C:\Users\dengz\.m2\repository\outer\outer-sdk-1.0.0.jar -DgroupId=com.oos -DartifactId=...原创 2019-07-18 19:13:14 · 568 阅读 · 0 评论