Javascript 如何在一次返回中获取多个事件值
我想在一个返回中获得多个返回值Javascript 如何在一次返回中获取多个事件值,javascript,html,Javascript,Html,我想在一个返回中获得多个返回值 $('#Tbl :checkbox:checked').closest('tr').each(function() { checkedRows.push( $(this).find('td:gt(0)').map(function() { return $(this).text(),$(this).find(".inputDate").val(),$(this).find('select').val(); }).g
$('#Tbl :checkbox:checked').closest('tr').each(function() {
checkedRows.push(
$(this).find('td:gt(0)').map(function() {
return $(this).text(),$(this).find(".inputDate").val(),$(this).find('select').val();
}).get()
);
});
使用如下所示的对象文字表示法:
return {
prop1: $(this).text(),
prop2: $(this).find(".inputDate").val(),
prop3: $(this).find('select').val()
}