文件名称:promise:简单对Promise进行总结
文件大小:7KB
文件格式:ZIP
更新时间:2024-06-07 00:30:06
es6 es6-promise JavaScript
####Promise 1、What is Promise? The Promise object is used for asynchronous computations. A Promise represents a value which may be available now, or in the future, or never. Promise用于异步计算 可以将异步操作队列话,按照期望的顺序执行 在对象之间传递和操作Promise 2、Why we use Promise? javascript为检查表单而生 创造javascript的主要目的是操作DOM 因此,javascript的操作大多是异步的 避免页面冻结 3、异步的简单例子 事件监听与响应 document.getElementById('start').addEventListener('click',st
【文件预览】:
promise-master
----easy-demo-catch()
--------error-rejected.js(361B)
--------error.js(376B)
--------catch-then.js(622B)
----callback-demo()
--------largestFile.js(2KB)
----README.md(5KB)
----easy-demo-then()
--------fulfilled-then.js(312B)
--------timeout.js(198B)
--------timeout2.js(426B)
--------timeout3.js(594B)
--------nested-then.js(844B)