diff --git "a/HTML5 \346\213\226\346\224\276/index.html" "b/HTML5 \346\213\226\346\224\276/index.html" new file mode 100644 index 0000000..f190941 --- /dev/null +++ "b/HTML5 \346\213\226\346\224\276/index.html" @@ -0,0 +1,116 @@ + + + + + + 拖动 + + + + +

拖放(Drag 和 drop)

+ +
+ + + + + + + +
+ + + + + + \ No newline at end of file diff --git a/promise2.js b/promise2.js index 215102b..818c876 100644 --- a/promise2.js +++ b/promise2.js @@ -44,3 +44,27 @@ p1.then((value) => { // setTimeout(() => { // console.log(p1) // },1100) + + +async function async1() { + console.log('async1 start'); + await async2(); + console.log('async1 end'); +} +async function async2() { + console.log('async2'); +} +console.log('script start'); +setTimeout(function() { + console.log('setTimeout'); +}, 0) +async1(); +new Promise(function(resolve) { + console.log('promise1'); + resolve(); +}).then(function() { + console.log('promise2'); +}); +console.log('script end'); + +// async1 start script start promise1 script end async2 async1 end \ No newline at end of file