0
我想弄清楚为什么我不能将字符串传递到包含另一个函数的函数中。当我警觉时,我得到undefined
。如何将字符串传递到jQuery中的嵌套函数
$.fn.downCount = function (current_time) {
function countdown(current_time) {
alert(current_time)
}
})
var current_time = "01:00";
downCount(current_time);
但这些代码不会警告任何东西。无论如何,如果你想使用'downCount'中的'current_time',那么''current_time'是'countdown'的参数。 – Li357