首页 > Web开发 > 详细

jQuery生成QRCode二维码

时间:2017-08-11 15:38:27      阅读:274      评论:0      收藏:0      [点我收藏+]
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>jQuery生成QRCode二维码</title>
</head>

<body>
<!-- 存放二维码 -->
<div id="qrcode-1"></div>
<!-- 存放二维码 -->
<div id="qrcode-2"></div>

<!-- 引入jQuery文件 -->
<script src="https://cdn.bootcss.com/jquery/3.0.0/jquery.min.js"></script>
<!-- 引入jQuery.qrcode文件 -->
<script src="https://cdn.bootcss.com/jquery.qrcode/1.0/jquery.qrcode.min.js"></script>

<script>
//第一种方法
$(‘#qrcode-1‘).qrcode("This is the first method");

//第二种方法
$(‘#qrcode-2‘).qrcode({
  width: 128,	//二维码宽度
  height: 128,	//二维码高度
  text: "This is the second method"		//字符串内容
});
</script>

</body>
</html>



本文出自 “tong707的博客” 博客,请务必保留此出处http://tong707.blog.51cto.com/12527988/1955415

jQuery生成QRCode二维码

原文:http://tong707.blog.51cto.com/12527988/1955415

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!