function printExcel() {
var a=document.getElementsByName('__LIST_HeGLSearchList.ID');
var b= a.length;
if(b==0){
alert('没有要打印的内容!');
return;
}
var winname=window.open('','_blank','top=10000');
var strHTML = '<TABLE>'+window.document.getElementsByName('__LIST_HeGLSearchList.ID')[0].parentElement.parentElement.parentElement.innerHTML+'</TABLE>';
winname.document.open('text/html','replace');
winname.document.writeln(strHTML);
winname.document.execCommand('saveas','','excel.xls');
winname.close();
}
var a=document.getElementsByName('__LIST_HeGLSearchList.ID');
var b= a.length;
if(b==0){
alert('没有要打印的内容!');
return;
}
var winname=window.open('','_blank','top=10000');
var strHTML = '<TABLE>'+window.document.getElementsByName('__LIST_HeGLSearchList.ID')[0].parentElement.parentElement.parentElement.innerHTML+'</TABLE>';
winname.document.open('text/html','replace');
winname.document.writeln(strHTML);
winname.document.execCommand('saveas','','excel.xls');
winname.close();
}