Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/431.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何在一次返回中获取多个事件值_Javascript_Html - Fatal编程技术网

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()
}