js_图片打印

html

	 <button id="printImg">打印</button>

js

      $("#printImg").click(function(){
    	  
    	  var agent = navigator.userAgent.toLowerCase() ;
    	  
    	  if(agent.indexOf("firefox") > 0)
          {
    		  var title="";
       	  	$.printImg($(".picBox img"),title); 
          }else{
        	var url = $("#acpicM .picBox img").attr("src");
         	var id=getOssKeyFormUrl(url);
         	window.open("${rootname}/attachments/img/"+id+"/get.do");
          }
     			
      });
发布了279 篇原创文章 · 获赞 113 · 访问量 78万+

猜你喜欢

转载自blog.csdn.net/icecoola_/article/details/102579674