通过javascript打印模型报告spcel设计错误?
我使用模型报告打印spcel设计报告,但结果并没有显示缺少的javascript代码。我不知道,所以请检查它现在,先生和我分享宝贵的想法通过javascript打印模型报告spcel设计错误?,javascript,ajax,Javascript,Ajax,我使用模型报告打印spcel设计报告,但结果并没有显示缺少的javascript代码。我不知道,所以请检查它现在,先生和我分享宝贵的想法 var win ='<table class="table table-bordered table-sm">'; win+='<tbody>'; win+='<tr>'; win+='<th scope="row">Sr. No.</th>'; win+='<th>Penalty Que
var win ='<table class="table table-bordered table-sm">';
win+='<tbody>';
win+='<tr>';
win+='<th scope="row">Sr. No.</th>';
win+='<th>Penalty Questions</th>';
win+='<th scope="row">Marked</th>';
win+='<th>No. of Units</th>';
win+='<th scope="row">Price</th>';
win+='<th>Total Amount</th>';
win+='</tr>';
//--------------------error part -----------------------here----------
if(global_res1){
var res = global_res1;
for(i=0;i<res['quest'].length;i++) {
win+='<tr><td>'+i+'</td><td>'+res['quest'][i]['quest']+'</td>';
if(res['quest'][i]['marked']=="Y") {
var tot_amt = res['quest'][i]['amount']*res['quest'][i]['unit'];
win+='<td><i class="fa fa-check-square-o bg-success"></td><td>'+res['quest'][i]['unit']+'</td><td>'+res['quest'][i]['amount']+'</td><td>'+tot_amt+'</td>';
sum+=tot_amt;
} else {
win+='<td></td><td></td><td></td><td></td>';
}
win+='</tr>';
}
win+='<tr><td> </td><th>Total amount</th><td></td><td></td><td></td><th>'+sum+'</th></tr>';
}
//-----------------------------------------------
win+='</tbody>';
win+='</table>';
var-win='';
赢+='';
赢+='';
win+=‘高级编号’;
win+=‘处罚问题’;
win+=‘已标记’;
win+=‘单位数量’;
赢+=‘价格’;
win+=‘总金额’;
赢+='';
//--------------------错误部分-----------------这里----------
如果(全局_res1){
var res=全局_res1;
对于(i=0;i错误是什么?如果您发布完整的代码并使其可复制,那就太好了缺少的部分不起作用语法错误?问题是,这个问题没有错误消息并且我们不知道global\u res1
。Uncaught ReferenceError:global\u res1没有定义
是我得到的全部。请看,因为我们正在编程默默斯而不是千里眼。