首页 > Web开发 > 详细

Web生成二维码的两种方式

时间:2015-05-19 07:27:24      阅读:276      评论:0      收藏:0      [点我收藏+]

方式1:使用sinaapp提供的接口生成,HTML代码如下:

<html>
<body>
<h3>qrcode based on sinaapp:</h3>
<img src=\‘#\‘" target=\"_blank\" href="http://qrcoder.sinaapp.com/?t=http://www.163.com">http://qrcoder.sinaapp.com?t=http://www.163.com">
</body>
</html>

技术分享

方式1:使用sinaapp提供的接口生成,HTML代码如下:

<html>
<head>
<script type=‘text/javascript‘ src=‘http://cdn.staticfile.org/jquery/2.1.1/jquery.min.js‘></script>
<script type="text/javascript" src=\‘#\‘" target=\"_blank\" href="http://cdn.staticfile.org/jquery.qrcode/1.0/jquery.qrcode.min.js">http://cdn.staticfile.org/jquery.qrcode/1.0/jquery.qrcode.min.js"></script>
<script>
jQuery(function(){
jQuery(‘#qrcode‘).qrcode("http://www.163.com");
})
</script>
</head>
<body>
<h3>qrcode based on jquery.qrcode:</h3>
<div id="qrcode"></div>
</body>
</html>

技术分享

Web生成二维码的两种方式

原文:http://yuanhuan.blog.51cto.com/3367116/1652542

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