خرید بک لینک
سلام
لطفا این کد زیر رو ببینید، من انتظار داشتم با کدهای زیر ابتدا فانکشن one اجرا بشه ولی ابتدا two اجرا میشه، مشکل کجاست؟

<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script>
function one(callback)
{

setTimeout(function () { alert("this is function one") }, 1000);


callback();
}
function two()
{
alert("this is function two");
}

</script>
</head>
<body>
<button onclick="one(two)">Click Here</button>
</body>
</html>


برچسب: اسکریپت, نویسنده: خنج تاريخ: جمعه 14 مهر 1396 ساعت: 17:51

صفحه بندی