zoukankan      html  css  js  c++  java
  • js生成二维码实例

    <!DOCTYPE html>
    <html>
    <head>
        <title></title>
        <meta charset="utf-8"/>
        <script src="http://www.luqidong.com/demo/qrcode/js/qrcode.js"></script>
        <style>
            #qrcode{
                /*text-align: center;*/
                /*display: table-cell;*/
                /* 96px;*/
                /*height: 96px;*/
                /*vertical-align:middle;*/
                /*position: relative;*/
            }
        </style>
    </head>
    <body>
    <div id="qrcode">
    </div>

    <input type="text" id="getval"/> <button id="send">点击更换验证码</button>
    <script>
        window.onload =function(){
            var qrcode = new QRCode(document.getElementById("qrcode"), {
                width : 96,//设置宽高
                height : 96
            });
            qrcode.makeCode("http://www.78oa.com");
            document.getElementById("send").onclick =function(){
                qrcode.makeCode(document.getElementById("getval").value);
            }
        }


    </script>
    </body>
    </html>

  • 相关阅读:
    cz_health_day07
    cz_health_day06
    mysql索引底层原理
    cz_health_day05
    redis无法获取连接原因分析
    cz_health_day04
    cz_health_day03
    cz_health_day02
    cz_health_day01
    Spring学习
  • 原文地址:https://www.cnblogs.com/dearxinli/p/4503553.html
Copyright © 2011-2022 走看看