如何查看回调函数中的参数“url”?获取回调函数中定义的参数值javascript函数
功能在全球范围内宣布:
var showPrompt = function(text, callBackFunc){
$('#msg').html(text);
$('#msgbtn').click(function(){callBackFunc();})
};
//调用函数
$('li').click(function(){ // about 100 li el.
var url = '/prod/' + $(this).data('id');
showPrompt('Page will be redirected', function(url){
window.location = url;
})
})
你为什么反对投票题? – jmav