- 博客(7)
- 收藏
- 关注
转载 js中load与onload的区别
一:window.load这个应该只是表明事件方法,但并未执行,比如hover、click表示事件,但它并未执行,必须用上hover、onclick他才会执行在页面加载渲染的时候通常会有一个Loading效果,这时就可以用它了$(window).load(function)页面当中的图片和其他资源加载完成之后才会执行;二:window.onload(function)中的这个方法可能会...
2019-02-22 15:32:28 8599
原创 multer上传文件—单复数文件问题
单文件上传时:<input type="file" name='myfiles>var formdata = new FormData();console.log(event.target.files);var file = event.target.files[0];//这里注意,event.target.files是多数组。所以单个文件上传要[0]formdat...
2019-02-21 11:05:18 413
转载 HTML5 File API 相关详解
博客园:https://www.cnblogs.com/zichi/p/html5-file-api.htmlMDN(1):https://developer.mozilla.org/zh-CN/docs/Web/API/FileMDN(2):https://developer.mozilla.org/zh-CN/docs/Web/API/File/Using_files_from_web...
2019-02-21 09:16:34 272
转载 Node中exports与module.export的使用与区别
最近在看《node开发实战详解》时有写疑问,所以自己就整理了一些资料。下面是node4.*的官方api文档(http://nodejs.cn/doc/node_4/modules.html#modules_module_exports),我有点看不懂,就拉出node.10*的官方api(https://nodejs.org/dist/v0.10.9/docs/api/modules.html#mo...
2018-05-11 00:21:10 1581
转载 e.target.files[0]层层剖析
$('input').change(function(e){ 1️⃣、console.log(e)==>得到的是什么呢 得到的是:下面这些altKey:undefinedbubbles:truecancelable:falsectrlKey:undefinedcurrentTarget:inputdata:nulldelegateTarget:inputdetail:undefinedev...
2018-05-10 17:45:18 3954
原创 AJAX基本用法-基础代码解析(1)- 数据传送过程
首先讲一下路由文件dome1.js和页面文件dome1.html如何联系起来的,先上代码(一般注释都在代码中):public文件下dome1.html代码:<!DOCTYPE html><html lang="en" dir="ltr"> <head> <meta charset="utf-8"> &
2018-05-10 14:46:06 868
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人