$(function () {
$("#dd").click(function () {
st($(this), 5000);
})
})
function st(arg, delay) {
setTimeout(function () {
clock(arg);
}, delay);
}
function clock(e) {
alert(e.val());
$("#dd").click(function () {
st($(this), 5000);
})
})
function st(arg, delay) {
setTimeout(function () {
clock(arg);
}, delay);
}
function clock(e) {
alert(e.val());
}
PS:setTimeout 接受的第一个参数要么是代码字符串要么是一个函数