随笔分类 -  前端之JS

摘要:代码 getWeekTime(){ // var new_Date = new Date(2021,11,10) //获取指定日期当周的一周日期 var new_Date = new Date() //获取本周一周日期 var timesStamp = new_Date.getTime(); var 阅读全文
posted @ 2022-03-24 10:01 無玑小姐 阅读(3809) 评论(0) 推荐(0)
摘要:正则验证 let num = /^[0-9a-zA-Z]*$/g; if (!num.test(value)) { callback("请输入字母,数字或字母数字组合"); } let num = /^[\u4e00-\u9fa5]+$/; if (!num.test(value)) { callb 阅读全文
posted @ 2021-01-20 09:23 無玑小姐 阅读(110) 评论(0) 推荐(0)
摘要:今天需要将一个对象push到一个对象数组中 const tableColumns = [ { title: '级别', dataIndex: 'VIP', width: 200 }, { title: '比例', dataIndex: 'FEE' }, ]; const operationColum 阅读全文
posted @ 2020-09-30 10:42 無玑小姐 阅读(3647) 评论(0) 推荐(0)
摘要:一、比较两个字符串格式的日期 思路:先得到两个字符串格式的日期,之后利用Date.parse()方法把这些字符串日期转成时间戳(实际上就是计算出从1970年00:00:00到目前时间日期的毫秒数),然后再比较两个时间戳的大小,就能判断日期大小。 1、得到标准的字符串格式的日期 一般我们的字符串格式的 阅读全文
posted @ 2020-09-22 15:28 無玑小姐 阅读(27361) 评论(0) 推荐(3)
摘要:1,发送get请求 *export({ payload }, { put }) { yield put({ type: 'updateState', payload: { ...payload, selectedRows: [], loading: true }, }); window.locati 阅读全文
posted @ 2020-08-26 13:56 無玑小姐 阅读(1021) 评论(0) 推荐(0)
摘要:一个下载的接口 *export({ payload }, { put }) { yield put({ type: 'updateState', payload: { ...payload, selectedRows: [], loading: true }, }); window.location 阅读全文
posted @ 2020-08-18 15:34 無玑小姐 阅读(2013) 评论(0) 推荐(1)
摘要:1,代码 阅读全文
posted @ 2019-03-26 19:21 無玑小姐 阅读(5002) 评论(0) 推荐(0)
摘要:转自:https://blog.csdn.net/u010964869/article/details/51095827 显示格式为:yyyy-mm-dd hh:mi:ss 注:parseInt可以不要 阅读全文
posted @ 2019-03-26 17:48 無玑小姐 阅读(200) 评论(0) 推荐(0)
摘要:js方法 阅读全文
posted @ 2019-03-20 10:51 無玑小姐 阅读(193) 评论(0) 推荐(0)
摘要:1,导航栏的html代码 2,信息列表的html代码 3,导航栏的点击事件 阅读全文
posted @ 2019-03-20 10:48 無玑小姐 阅读(422) 评论(0) 推荐(0)
摘要:1,需要用到jquery.pagination.js和pagination.css https://pan.baidu.com/s/1G3PLQSRGjvLxl2ryqpV76w https://pan.baidu.com/s/1KvutZaTa21xW-JZsKNb4lQ 2,分页的js代码如下 阅读全文
posted @ 2019-02-28 16:25 無玑小姐 阅读(808) 评论(0) 推荐(0)
摘要:1, 2, 阅读全文
posted @ 2019-01-23 15:26 無玑小姐 阅读(1943) 评论(0) 推荐(0)
摘要:1,页面 2,js 3,后台 4,出现问题 (1)一开始用的ajax发送的请求 但是响应头正确,数据也正确的传到后台,但是未下载文件 总结(参考:https://www.cnblogs.com/qlqwjy/p/8971207.html): 即使ajax请求到一个controller在跳转到下载的c 阅读全文
posted @ 2019-01-04 17:05 無玑小姐 阅读(1821) 评论(0) 推荐(0)
摘要:原文:https://blog.csdn.net/hu_mouse/article/details/47972271 阅读全文
posted @ 2018-12-24 17:58 無玑小姐 阅读(3997) 评论(0) 推荐(0)
摘要:var a = xxxxxxxx; if(typeof a == "number") { //a是数 } else if(typeof a == "string") { //a是字符串 } else if(typeof a == "undefined") { //a是未定义 } else if(typeof a == "boolean") { //a是bool变量... 阅读全文
posted @ 2018-12-24 15:22 無玑小姐 阅读(281) 评论(0) 推荐(0)
摘要:1,字符串中是否包含 2,数组中是否包含 阅读全文
posted @ 2018-12-24 15:00 無玑小姐 阅读(574) 评论(0) 推荐(0)
摘要:1,格式化json对象 2,格式化json字符串 结果 阅读全文
posted @ 2018-12-20 17:55 無玑小姐 阅读(16241) 评论(1) 推荐(1)
摘要:2,模态框 点击1中的"API测试工具"即可打开弹窗 二,点击的先调用js方法判断是否要打开 1,点击按钮:相比一.1 去掉了[data-toggle="modal" data-target="#test"] 2,弹窗不变 3,在方法toApiTestPage()中 阅读全文
posted @ 2018-12-20 17:29 無玑小姐 阅读(5700) 评论(0) 推荐(0)
摘要:$('.disableCss').removeAttr('href');//去掉a标签中的href属性 $('.disableCss').removeAttr('onclick');//去掉a标签中的onclick事件 如果有data-toggle切换tab页的属性,需要增加一个$(".disabl 阅读全文
posted @ 2018-12-10 10:49 無玑小姐 阅读(3097) 评论(0) 推荐(0)
摘要:$('input[name="serviceMode"]:checked').each(function(){ this.attr('value') }); 阅读全文
posted @ 2018-10-17 10:30 無玑小姐 阅读(437) 评论(0) 推荐(0)