簡體   English   中英

單擊圖像鏈接時如何打印圖像?

[英]How I can print the image when click the image link?

 <div class="grid col-220 cert">
   <a href="images/1.jpg" class="certTop" rel="prettyPhoto[certificates]"><img src="images/thumb/" /></a>
   <a href="images/1.jpg" class="certBottom" ><i class="fa fa-print"></i>Certificate Name </a>
</div>

單擊類“ .certBottom”時,我想打印1.jpg。 我該怎么做?

使用以下jQuery代碼:

$(document).ready(function() {
   $(".certTop").click(function () {
      $(this).append('<img src="images/1.jpg">');
   });
});

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM