我有以下代码:
var submitHandler = function ($link, $form, close) {
var val = $form.valid();
var action = $form.attr('data-action')
var entity = $form.attr('data-entity')
var href = $form.attr('data-href');
var rownum = $link.attr('data-row');
var $row = $('#row_' + rownum);
var $submitBt = $('.block-footer button:contains("Submit")');
.....
.....
jsonSuccessModal(action, rownum, close, $form, $submitBt, $row);
}
function jsonSuccessModal(action, rownum, close, $form, $submitBt, $row) {
...
}
除了有很多参数之外,还有一种方法可以在第一个代码块中组合变量,然后只需将表示组合的对象发送到 jsonSuccessModal。像匿名对象之类的东西?