js生成二维码

一、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

原文地址:https://www.cnblogs.com/chenmo-xpw/p/5920768.html