我想传值的时候不行。 这是我的代码,
function showimage(b)
{
//if alert was here, it would show the value of b
$("#lightboxholder").show("fast","",function (b)
{
alert(b);//but now when the alert is here, it is not showing the value of b
});
}
我是不是漏掉了什么东西?提前致谢!
最佳答案
内部函数将使用新参数调用,因此 b
将替换为新变量。
如果您将 function (b)
替换为 function ()
- 那么内部 b
应该是给外部函数的那个。
关于javascript - 无法将值传递给 jquery 函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13035338/