1.html2canvas.js(點我下載。提取碼:d0t5)
<script type="text/javascript"> html2canvas($(".qrcode")[0], { onrendered: function(canvas) { $(".qrcode").html(canvas); } }); </script>
2.jq.qrcode.logo.js
<script type="text/javascript">
function createQRCode(id, url, width, height, src){
$('#'+id).empty();
jQuery('#'+id).qrcode({
render: 'canvas',
text: url,
width : width, //二維碼的寬度
height : height, //二維碼的高度
imgWidth : width/4, //圖片寬
imgHeight : height/4, //圖片高
src: src //圖片中央的二維碼
});
}
function init() {
createQRCode("code", "測試", $("#code").width(),
$("#code").height(), "img/logo.png");
}
init()
</script>
3.固定的內容,可以自己直接制作,網站鏈接
