![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
笔记
潇忘笙
!
展开
-
在localhost和本地服务器(127.0.0.1)中使用ajax发起post请求遇到的问题。
首先用ajsx访问本地json文件时,应该使用get方法,而不是post。json算静态文件,一般不支持post请求$.ajax({ type: "POST", url: "./movie.json", dataType: 'json', async: false, // //返回数据形式为json success: functio原创 2021-11-02 17:38:59 · 1334 阅读 · 0 评论 -
日期时间格式
函数:// 时间格式化 dateFormat (fmt, date) { let ret const opt = { 'Y+': date.getFullYear().toString(), 'm+': (date.getMonth() + 1).toString(), 'd+': date.getDate().toString(), 'H+': date.getHours().toString(),原创 2021-10-13 23:47:34 · 107 阅读 · 0 评论