如何在Javascript中创建异步函数?
<a href="#" id="link">Link</a><span>Moving</span>$('#link').click(function () { console.log("Enter"); $('#link').animate({ width: 200 }, 2000, function() { console.log("finished"); }); console.log("Exit"); });
$('#link').click(function () { console.log("Enter"); asyncFunct(); console.log("Exit"); });function asyncFunct() { console.log("finished");}
function asyncFunct() { }
setTimeout()
拉莫斯之舞
慕姐8265434
相关分类