问题
I am using the jQuery Load method.
$('#tabs-1').load("@Html.Raw(Url.Action("IndexTpUse",
"Transactions"))", completed);
function completed(response, status, xhr)
{
}
What I need is to send an additional parameter from the load method into the completed function. Is it possible?
So that my final result might be something like this:
function completed(response, status, xhr, additionalParam)
{
}
Thanks
回答1:
You can use bind
to predefine some function parameters:
$('#tabs-1').load("@Html.Raw(Url.Action("IndexTpUse","Transactions"))", completed.bind(null, 'my param value'));
function completed(additionalParam, response, status, xhr)
{
}
来源:https://stackoverflow.com/questions/21026844/jquery-load-additional-parameter