如何查看回調函數中的參數「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