首页 > 技术文章 > js生成二维码

chenmo-xpw 2016-09-29 17:54 原文

 

一、js 二维码生成demo

①、先下载 js qrcode 库  

 

②、使用极其简单  

<!DOCTYPE html>
<html>
<head>
<title>qrcode demo</title>

</head>
<body>

<div id="qrcode"></div>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<script type="text/javascript" src="jquery.qrcode.min.js"></script>
<script>

jQuery(function(){
    jQuery('#qrcode').qrcode("http://taobao.com");
})
</script>

</body>
</html> 

二、参考文献

https://github.com/jeromeetienne/jquery-qrcode

推荐阅读