使用javascript打印时无法加载图像 [英] Image is not load in print using javascript

查看:98
本文介绍了使用javascript打印时无法加载图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在打印时遇到问题。在我的打印中我有一张图像,图片未在谷歌浏览器中加载。在IE和Firefox中,图像显示效果不错但在Chrome中它显示为空。



这是我的打印代码



Hi
I have a problem in Printing.In my Print i have an image that image is not loaded in Google Chrome.In IE and Firefox the image is showing good but in Chrome it gives empty.

Here is my print code

function CallPrint(strid) {

           
           var strPrint = "<table width=100% border='0'><tr align='center'><td><img src='Images/Image1.jpg' /></td></tr><tr align='center'><td><font face='verdana' size=3><b><u>Hi</u></b></font></td></tr></table>"          
           var WinPrint = window.open('', '', 'left=20,top=20,width=750,height=600,toolbar=0,scrollbars=0,status=0');

           WinPrint.document.write(strPrint);
           WinPrint.document.close();
           WinPrint.focus();
           WinPrint.print();
           WinPrint.close();
       }

推荐答案

可能有图像路径的可能性。
May be there is possibilites with image path.


你好,



这是一个问题,你可以查看链接以便理解。



使用javascript打印图像时发出错误



谢谢
Hi,

Here is a problem, you can view the link for understanding.

Issue while printing an image using javascript

Thanks


这篇关于使用javascript打印时无法加载图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆