Use jquery's Jqcode plugin to generate two-dimensional code and print

Source: Internet
Author: User

This article refers to this: https://www.cnblogs.com/chenyucong/p/5996544.html

The use of JS has three, the first is jquery, put in the first, the second is a two-dimensional code generation plug-in Jquery.qrcode.js, the third is the print plug-in jquery.jqprint-0.3.js

The following is a simple example:

<! DOCTYPE html>    </body>

  

1th:

The canvas label does not print directly, because it is dynamic and the print will show blank,

Here is the use of an IMG tag, first assign the canvas image to IMG, and then print IMG, because the display property above the definition of the IMG tag is none, so it will not be displayed.

2nd:

On lines 84 and 85, when you get the canvas and IMG tags, you cannot use JQ to get them, or you will be given an error, as follows

3rd:

The properties of render can be changed to table, but cannot be printed when the table is changed, because it is not an image and cannot be transferred to IMG.

The end result is as follows:

Click to generate two-dimensional code map

Click Print Chart

Use jquery's Jqcode plugin to generate two-dimensional code and print

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.