添加一个类继承JsonResult public class CustomJsonResult : JsonResult { private const string _dateFormat = "yyyy-MM-dd HH:mm:ss"; public CustomJsonResult() { s ...
分类:
Web程序 时间:
2021-04-28 12:07:11
阅读次数:
0
前言 有时候我们需要前端处理后端传过来的时间戳进行格式化为日期。 第一步 首先在src目录下建立js文件,如:date.js,加入如下代码 //日期格式化 export function formatDate(date, fmt) { if (/(y+)/.test(fmt)) { fmt = fm ...
分类:
其他好文 时间:
2021-04-28 11:50:24
阅读次数:
0
1、设置FullRowSelect 为true 2、添加SelectedIndexChanged事件 3、添加代码 ...
<form id="form1"> <input type="text" value="1" name="Total" /> </form> //判断序列化表单是否包含空值 var data = $("#form").serialize(); var array = data.split("&"); ...
分类:
Web程序 时间:
2021-04-27 14:39:33
阅读次数:
0
for..in loops iterate over the entire prototype chain, which is virtually never what you want. 意思是使用for..in会遍历整个原型链,这样不是很好的实现方法,推荐使用Object.keys formRu ...
分类:
其他好文 时间:
2021-04-27 14:24:47
阅读次数:
0
c++11 中的 shared_from_this() 来源于 boost 中的 enable_shared_form_this 类和 shared_from_this() 函数,功能为返回一个当前类的 std::share_ptr,使用方法如下: #include<memory> class Te ...
分类:
编程语言 时间:
2021-04-26 13:06:17
阅读次数:
0
路径编写总结和url_pattern的编写方式 路径的编写 超链接 form表单的action属性 重定向 response.sendRedirect("/项目名/资源路径"); 转发 request.getRequestDispatcher("/资源路径").forword(request,res ...
分类:
编程语言 时间:
2021-04-24 13:57:14
阅读次数:
0
django ajax提交时 携带CSRF token ...
分类:
Web程序 时间:
2021-04-24 13:44:17
阅读次数:
0
JWT认证 官网:https://github.com/jpadilla/django-rest-framework-jwt 在用户注册或登录后,我们想记录用户的登录状态,或者为用户创建身份认证的凭证。我们不再使用Session认证机制,而使用Json Web Token(本质就是token)认证机 ...
分类:
其他好文 时间:
2021-04-24 13:24:49
阅读次数:
0
Vue 使用Export2Excel导出excel、使用xlsx导入excel ...
分类:
其他好文 时间:
2021-04-24 11:46:35
阅读次数:
0