版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/xiejunna/article/details/82804124
html里代码:
<!DOCTYPE html>
<html>
<head>
<!--引入jquery,jquery.qrcode-->
<script type='text/javascript'src='http://cdn.staticfile.org/jquery/2.1.1/jquery.min.js'></script>
<script type="text/javascript"src="http://cdn.staticfile.org/jquery.qrcode/1.0/jquery.qrcode.min.js"></script>
</head>
<body>
<div id = "qrid"></div>
</body>
<script>
$(function(){
var qrstr = "https://www.xxx.com/xxx/xxx";
$('#qrid').qrcode(qrstr);//不指定二维码大写
$('#qrid').qrcode({width: 280,height: 280,text: qrstr});//指定二维码大小
});
</script>
</html>