方法一、
function GetCode(event){alert(event.data.foo);}
$(document).ready(function(){$("#summary").bind("click", {foo:'abc'} ,GetCode);});
方法二、
函數句柄
$("#summary").bind("click", function(){GetCode("abc")});
function GetCode(str){}
方法三、
函數閉包
function GetCode(str){return function(){alert(str)}}
$("#summary").bind("click", GetCode("abc"));
新聞熱點
疑難解答