标签:display code tco make content style 演示 doctype win
二维码格式演示
(扫描此二维码会自动跳转到我博客的首页O(∩_∩)O~)
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>qrcode.js插件将你的内容转换成二维码格式</title> <link rel="stylesheet" href="css/style.css"> </head> <body> <div class="lanren"> <h1>Gary_请在下面输入框中输入内容</h1> <input type="text" placeholder="请在这里输入内容" id="demo"> <button id="send">点击生成二维码</button> <br></br><br></br> <div id="qrcode"></div> </div> <p></p> <script src="js/qrcode.min.js"></script> <script> window.onload =function(){ (function(){ var defaultContent = ‘http://www.cnblogs.com/1138720556Gary/‘; var content = document.getElementById("qrcode"); var qrcode = new QRCode(content,{ width:200, height:200 }); document.getElementById("send").onclick =function(){ var value = document.getElementById("demo").value || defaultContent; qrcode.makeCode(value); content.style.display = "block"; } })(); } </script> </body> </html>
实现过程:
JS框架_(Qrcode.js)插件将你的内容转换成二维码格式
标签:display code tco make content style 演示 doctype win
原文地址:https://www.cnblogs.com/1138720556Gary/p/9383358.html