我有这样的数据
+-------------+-------+ | countryCode | label | +-------------+-------+ | KM | A | +-------------+-------+ | AD | A | +-------------+-------+ | TH | B | +-------------+-------+ | KM | B | +-------------+-------+
如何找到像这样的平均数
+-------------+-----+-----+-------+ | countryCode | A | B | count | +-------------+-----+-----+-------+ | KM | 0.5 | 0.5 | 2 | +-------------+-----+-----+-------+ | AD | 1 | 0 | 1 | +-------------+-----+-----+-------+ | TH | 0 | 1 | 1 | +-------------+-----+-----+-------+
答案 0 :(得分:0)
你走了。
$(document).on('click',function(){
if (window.opener != null && !window.opener.closed){
var val=$('#name').val();
$('#search').val(val);
}
window.close();
});
你可以弄清楚其余部分。