随笔 - 144  文章 - 0  评论 - 2  阅读 - 91716

随笔分类 -  JS

js直接下载PDF
摘要:1、前端引入js <script type="text/javascript" src="${pageContext.request.contextPath}/modules/util/downDoc/html2pdf.js"></script> 2、js方法 html定义div $("#downP 阅读全文
posted @ 2023-07-24 09:15 IT-QI 阅读(2982) 评论(0) 推荐(0) 编辑
密码修改
摘要:验证可以 fzdpaword:function(value){ var regex = new RegExp(/(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9]).{6,20}/); if(!regex.test(value)){ return '您的密 阅读全文
posted @ 2022-08-16 19:53 IT-QI 阅读(121) 评论(0) 推荐(0) 编辑
动态增加行和减少行(table表格)
摘要:<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %> <%@ include file="/WEB-INF/jsp/sys/css.jsp"%> <%@ include file= 阅读全文
posted @ 2022-03-30 16:10 IT-QI 阅读(166) 评论(0) 推荐(0) 编辑
input事件
摘要:输入整数且保留两位小数<input type="text" id="costs1" class="layui-input" value="" onkeyup="this.value= this.value.match(/\d+(\.\d{0,2})?/) ? this.value.match(/\d 阅读全文
posted @ 2022-03-21 10:52 IT-QI 阅读(113) 评论(0) 推荐(0) 编辑
循环tabel,计算table中的值
摘要:var tableObj = document.getElementById("baoxiao");//-3是因为后边三行不计算for (var i = 1; i < tableObj.rows.length-3; i++) { //遍历Table的所有Row if(tableObj.rows[i] 阅读全文
posted @ 2022-03-21 09:54 IT-QI 阅读(26) 评论(0) 推荐(0) 编辑
JS页面校验数字的正则
摘要:输入纯数字<input type="text" id="costs" name="costs" onkeyup="checkNum(this)" lay-verify="required" class="layui-input" value="${object.costs}" > window.ch 阅读全文
posted @ 2022-03-17 17:12 IT-QI 阅读(451) 评论(0) 推荐(0) 编辑
js判断字符串中是否包含特殊字符、中文
摘要:/** * @author:xc * @desc: 特殊字符校验 除了下划线 */ containSpecial(str) { var containSpecial = RegExp( /[(\ )(\~)(\!)(\@)(\#)(\$)(\%)(\^)(\&)(\*)(\()(\))(\-)(\+ 阅读全文
posted @ 2022-01-19 15:41 IT-QI 阅读(2154) 评论(0) 推荐(1) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示