Objective
In the recent project has a requirement is to generate a two-dimensional code with parameters, consider the use of Java background generation back to the front-end display, after the Qrcode.js plug-in with jquery can be very good reality, the following words do not say, directly on the implementation of the process.
Introduce JS:
Require.config ({ baseurl: "/", paths: {jquery: ' Plugin/jquery/jquery-3.1.0.min ', QRCode: ' plugin/qrcode/ QRCode ' }}); Require ( [' jquery ', ' QRCode ' ], function ($) {xxxx. })
Dom to render:
<div id= "Qrcodecanvas" ></div>
Initialize two-dimensional code:
It is noteworthy that "text" if it is linked and need to automatically jump, just take the http://start
Effect Chart:
Well, the above is the use of JavaScript to generate a two-dimensional code with parameters of the entire content, I hope this article on the content of our study or work can bring some help, if you have questions you can message exchange.