引入插件:
<script src="${ctxStatic}/js/jquery/qrcode/jquery.qrcode.min.js" type="text/javascript"></script>
页面上的元素:
<div id="qr_${tag.qrcode}"><script type="text/javascript">qrcreat("${tag.qrcode}");</script></div>
方法:
function qrcreat(num){
$("#qr_"+num).qrcode({
"render": "image", //render method: 'canvas', 'image' or 'div'
"size": 120,
"text": num
});
}