如何在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()
慕斯709654
蝴蝶刀刀
相关分类