本文介绍了如何在javascript中使用print选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<script type="text/javascript"> function PrintGridData() { var prtGrid = document.getElementById('<%=searchedgrid.ClientID %>'); var prtMenu = document.getElementById("<%=lblCurrentPath.ClientID %>").innerHTML; var prtwin = window.open('', 'PrintGridView', 'left=100,top=100,width=400,height=400,tollbar=0,scrollbars=1,status=0,resizable=1'); if (prtMenu != null) { prtwin.document.write(prtMenu.outerHTML); } if (prtGrid != null) { prtwin.document.write(prtGrid.outerHTML); } prtwin.document.close(); prtwin.focus(); prtwin.print(); prtwin.close(); } </script>
prtMenu得到了价值......但是在打印窗口显示未定义的......错误是什么?
prtMenu got the value ... but at print window its showing undefined... What would be the error??
推荐答案
更多推荐
如何在javascript中使用print选项
发布评论