随笔分类 -  js

摘要:"原文" 工作示例 阅读全文
posted @ 2019-09-25 22:20 Ajanuw 阅读(1714) 评论(0) 推荐(0)
摘要:```js window.getSelection().toString(); ``` 阅读全文
posted @ 2019-04-26 09:56 Ajanuw 阅读(340) 评论(0) 推荐(0)
摘要:使用 "jquery.localize.js" CodeSandbox 代码演示 阅读全文
posted @ 2019-02-21 18:52 Ajanuw 阅读(635) 评论(0) 推荐(1)
摘要:``` console.log(navigator.platform); // Win32 Object.defineProperty(navigator, 'platform', { value: 'cc', writable: true, configurable: true, enumerable: tr... 阅读全文
posted @ 2019-01-28 17:43 Ajanuw 阅读(1804) 评论(0) 推荐(0)
摘要:"MIME类型" 阅读全文
posted @ 2019-01-28 14:50 Ajanuw 阅读(616) 评论(0) 推荐(0)
摘要:document.write(navigator.userAgent) // Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537 阅读全文
posted @ 2019-01-25 23:15 Ajanuw
摘要:``` --> Document ``` 阅读全文
posted @ 2019-01-23 11:15 Ajanuw
摘要:1 2 const CancelToken = axios.CancelToken; let cancel; axios("http://localhost:5000/test", { cancelToken: new CancelToken(function executor(c) { l( ); 阅读全文
posted @ 2018-11-29 11:31 Ajanuw 阅读(2708) 评论(0) 推荐(1)
摘要:https://stackoverflow.com/questions/29285056/get-video-duration-when-input-a-video-file <body> <input type="file" name="asd" id="a" accept="image/png, 阅读全文
posted @ 2018-11-14 19:46 Ajanuw
摘要:"资料" function 函数 没有“this”的持久概念, 调用函数时,创建this 引用具有持久this值的函数 箭头函数 箭头函数捕获this = 创建函数的位置 而不是调用它的位置 箭头函数没有自己的 , 箭头函数内部的上下文在函数的整个生命周期中保持不变, 并且始终将this绑定到最接近 阅读全文
posted @ 2018-10-19 23:50 Ajanuw 阅读(249) 评论(0) 推荐(0)
摘要:"mdn" 前端代码 "github" 点击上传 async function main() { const l = console.log let fileEle = document.querySelector(' a') fileEle.onchange = e = { let files = 阅读全文
posted @ 2018-09-10 00:07 Ajanuw 阅读(4183) 评论(0) 推荐(0)
摘要:后台express需要connect-multiparty模块接收formData的数据类型 class ourFormData { constructor(data, rs) { return new String((function (data, rs) { let data_string = 阅读全文
posted @ 2018-07-26 13:38 Ajanuw 阅读(2293) 评论(0) 推荐(0)
摘要:"文档" 切片下载 let data = new Blob(['hello ajanuw'], { type: 'application/text' }) let size = data.size; let data1 = data.slice(0, size / 2, data.type) let 阅读全文
posted @ 2018-07-01 18:00 Ajanuw 阅读(4288) 评论(0) 推荐(0)
摘要:原文博客 { var buffer = new ArrayBuffer(2) var bytes = new Uint16Array(buffer) bytes[0] = (65 << 8) + 66 var blob = new Blob([buffer], { type: 'text/plain 阅读全文
posted @ 2018-07-01 16:53 Ajanuw 阅读(5096) 评论(0) 推荐(0)
摘要:arrayBuffer文档 一个十六进制代表4位,0xF = 1111,0xFF = 1111 1111,八位是1字节,所以通常用两个16进制代表1字节。 假如我申请一个8字节的内存空间,然后初始化为0,大概就这样: 00 00 00 00 00 00 00 00 什么是类型,BYTE(1字节),W 阅读全文
posted @ 2018-06-30 20:00 Ajanuw 阅读(2470) 评论(0) 推荐(0)
摘要:前台 解析失败不会抛出任何异常, 只会返回一个给定的错误文档 后台 阅读全文
posted @ 2018-06-28 10:07 Ajanuw 阅读(924) 评论(0) 推荐(0)
摘要:form.elements 获取所有表单元素 form 表单 js 代码 body 打印结果 post 后服务器收到的结果 阅读全文
posted @ 2018-06-23 20:30 Ajanuw 阅读(3448) 评论(0) 推荐(2)
摘要:html 模板 js 阅读全文
posted @ 2018-06-23 19:45 Ajanuw 阅读(182) 评论(0) 推荐(0)
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2018-06-07 13:18 Ajanuw 阅读(375) 评论(0) 推荐(0)