随笔分类 -  js+css+plugin

摘要:**# 常用form方法 ** $("input[name='layuiTreeCheck_5']").prop("disabled",true) $(':input', '#myform').not(':button, :submit, :reset, :hidden,:radio') .val( 阅读全文
posted @ 2022-07-18 11:23 秋水秋色 阅读(50) 评论(0) 推荐(0) 编辑
摘要:常用正则 ^-?[1-9]\\d*$/ 整数 ^[1-9]\\d*$/ 正整数 ^-[1-9]\\d*$/ 负整数 ^([+-]?)\\d*\\.?\\d+$/ 数字 ^[1-9]\\d*|0$/ 正整数+0 ^-[1-9]\\d*|0$/ 负整数+0 ^([+-]?)\\d*\\.\\d+$/ 浮 阅读全文
posted @ 2022-07-18 11:21 秋水秋色 阅读(18) 评论(0) 推荐(0) 编辑
摘要:先定义隐藏内容div <div id="###" style="display: none;"> </div>定义function function showContent(index) { $(this).text($("###").is(":hidden") ? "隐藏" : "展开"); $( 阅读全文
posted @ 2021-01-12 11:23 秋水秋色 阅读(320) 评论(0) 推荐(0) 编辑
摘要:引入百度map js<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=ak"/> 初始化百度地图 map = new BMap.Map("mapdiv"); map.centerAndZoom(new 阅读全文
posted @ 2020-12-30 15:16 秋水秋色 阅读(8426) 评论(0) 推荐(0) 编辑
摘要:var show_num=[];draw(show_num); function draw(show_num) { var canvas_width = $('#canvas').width(); var canvas_height = $('#canvas').height(); var canv 阅读全文
posted @ 2020-12-01 11:04 秋水秋色 阅读(142) 评论(0) 推荐(0) 编辑
摘要:html { -webkit-filter: grayscale(100%); -moz-filter: grayscale(100%); -ms-filter: grayscale(100%); -o-filter: grayscale(100%); filter: grayscale(100%) 阅读全文
posted @ 2020-06-05 16:12 秋水秋色 阅读(512) 评论(0) 推荐(0) 编辑
摘要:判断是不是为空1、th:if="${xxx} != null" th:if="${xxx != null}"是不是为空字符串 1、th:if="${#strings.isEmpty(xxx)}"不存在设置默认值th:text="${xxx} ?: 'defaultVal'"截取 ${#strings 阅读全文
posted @ 2019-08-23 16:22 秋水秋色 阅读(720) 评论(0) 推荐(0) 编辑
摘要://将第三个参数改为false,表示不去勾选父节点下的所有子节点 zTreeObj.checkNode(node, true, false); setting.check.chkboxType = { "Y" : "s", "N" : "s" };Y指的是勾选checkbox的时候对父结点或子结点产 阅读全文
posted @ 2019-07-23 22:15 秋水秋色 阅读(1357) 评论(0) 推荐(0) 编辑
摘要://通过数量,单价的输入,实时显示总价 $("#number,#price").on("input",function(e){ $("#totalPrice").val(0); var number = $('#number').val(); var price = $('#price').val( 阅读全文
posted @ 2019-07-14 23:31 秋水秋色 阅读(2583) 评论(0) 推荐(0) 编辑
摘要:摘录于网上资源 ... 阅读全文
posted @ 2019-02-22 14:12 秋水秋色 阅读(192) 评论(0) 推荐(0) 编辑
摘要:转摘于其他博客var data =[ { name: "金",sex:"1",age:26 }, { name: "才",sex:"0",age:20 }, { name: "松",sex:"1",age:22 }, { name: "功",sex:"1",age:18 } ]; //日常用法 console.log(data,'数组');... 阅读全文
posted @ 2019-02-20 14:16 秋水秋色 阅读(911) 评论(0) 推荐(0) 编辑
摘要://对tbody行输入的数据进行校验,如果不用try catch方式 直接return的话,只会跳出循环,还是会往下运行代码,故采用try catch方式try{ $("#server_t").find("tr").each(function(){ var tdArr = $(this).child 阅读全文
posted @ 2018-09-29 15:05 秋水秋色 阅读(894) 评论(0) 推荐(0) 编辑
摘要:1 (function() { 2 var root = this, store, doc; 3 var _func = {}; 4 5 if(typeof module !== 'undefined' && module.exports) { 6 module.exports = _func; 7 }else {... 阅读全文
posted @ 2018-04-23 17:22 秋水秋色 阅读(364) 评论(0) 推荐(0) 编辑
摘要:1 2 3 4 5 横向两列布局 6 68 69 70 71 页头 72 导航 73 74 左-上 75 右-上 76 77 78 左-下 79 右-上 80 右-下 81 82 页脚 83 84 85 ... 阅读全文
posted @ 2018-03-21 18:46 秋水秋色 阅读(863) 评论(0) 推荐(0) 编辑
摘要:1、文本取值、赋值 $("#id").attr("value"); $("#id").val(); $("#id).attr("value", "new-value"); 2、radio $("input[name='xxx']:checked").val(); $("input[@name='xx 阅读全文
posted @ 2018-03-15 11:41 秋水秋色 阅读(719) 评论(0) 推荐(0) 编辑
摘要:在URL传值中文出现乱码的时候,可使用encodeURI(url)编码URL,并且调用二次 promptMsg这个值是通过prompt组件获取得到的。 var urlVal = "/project/head/overProject?projectId="+projectId + "&msg=" + 阅读全文
posted @ 2018-01-27 20:23 秋水秋色 阅读(113) 评论(0) 推荐(0) 编辑
摘要:格式化金额 //json降序排序,按其中某个属性排序,比如ID function sortByDesc(a,b){ return b.id-a.id; } $.ajaxSetup({cache:false}); 设置ajax非缓存机制 校验手机号码正则: new RegExp(/^((13[0-9] 阅读全文
posted @ 2018-01-27 20:16 秋水秋色 阅读(122) 评论(0) 推荐(0) 编辑
摘要:设置<a>标签不跳转,添加点击事件返回false即可 onclick=func();return false; 阅读全文
posted @ 2018-01-27 19:51 秋水秋色 阅读(79) 评论(0) 推荐(0) 编辑
摘要:默认 $('#btn-01').click(function(){ $.dialog({ contentHtml : '<p>我是默认弹出对话框示例展示。我只是用来占位的内容展示,仅仅用来占位撑起提示内容的高度。我只是用来占位的内容展示,仅仅用来占位撑起提示内容的高度。</p>' }); }); 自 阅读全文
posted @ 2018-01-22 20:46 秋水秋色 阅读(179) 评论(0) 推荐(0) 编辑

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