![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
javaScript
哈哈哈嗝哈哈哈
这个作者很懒,什么都没留下…
展开
-
js动态修改滚动条样式
js动态改变滚动条样式原创 2022-06-11 21:17:32 · 2736 阅读 · 0 评论 -
HTML5 拖放
HTML5 拖放<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <t原创 2022-05-18 11:28:34 · 76 阅读 · 0 评论 -
前端处理数组为多级嵌套树状结构
//原始数据 var v = [ { id: 9, name: "第九个", prant_id: 5 }, { id: 1, name: "第一个" }, { id: 2, name: "第二个" }, { id: 3, name: "第三个" }, { id: 4, name: "第四个" }, { id: 5, name: "第五个", prant_id: 1 }, { id: 6, nam原创 2021-03-10 16:34:45 · 636 阅读 · 0 评论 -
Canvas画板 带暂停加速回放减速功能
canvas写字板 带暂停加速回放减速功能写这个的原因是支付宝写福字可以回放,就自己写一个试试。<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>画板</titl原创 2021-02-19 13:07:46 · 427 阅读 · 0 评论 -
django 前端请求js 报错
django 前端请求js 报错错误内容:Refused to execute script from ‘http://127.0.0.1:8888/media/xxx.js’ because its MIME type (‘text/plain’) is not executable, and strict MIME type checking is enabled.方法在 settings.py 添加import mimetypesmimetypes.add_type(“text/javas原创 2020-05-15 13:56:03 · 321 阅读 · 0 评论 -
使用 reduce获取数组最小值 和索引
var arr = [0,1,2,4,6,10,-1]var obj = arr.reduce((a,b,index,arr)=>{ if(b<a.val){ a.val = b; a.index = index }else{ console.log(b) } return a},{val:arr[0],index:0})console.log(o...原创 2020-01-07 16:33:14 · 1030 阅读 · 0 评论