下面前端入门建站教程为大家介绍一下利用jquery和jquery.qrcode.min生成带logo的二维码(附代
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Qrcode Test</title>
</head>
<body>
<div id="qrcode"></div>
<script type="text/javascript" src="jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="jquery.qrcode.min.js"></script>
<script type="text/javascript">
//创建二维码
window.onload=function QRCode(){
jQuery('#qrcode').qrcode({
render: 'canvas',
text: "http://www.ipkd.cn/", //二维码地址
width : "200", //二维码的宽度
height : "200", //二维码的高度
imgWidth : 220/3.5, //二维码宽
imgHeight : 220/3.5, //二维码高
src: 'img/logo.png' //二维码logo
});
}
</script>
</body>
</html>
上面是“利用jquery和jquery.qrcode.min生成带logo的二维码(附代”的全面内容,想了解更多关于 js 文章,请继续关注前端入门建站教程。