如何在javascript中使用print选项

编程入门 行业动态 更新时间:2024-10-21 18:34:47
本文介绍了如何在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选项

本文发布于:2023-11-23 19:50:14,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1622678.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:选项   如何在   javascript   print

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!