zoukankan      html  css  js  c++  java
  • 生成二维码(jquery.qrcode.min.js插件)

    生成二维码:参看GitHub资源https://github.com/jeromeetienne/jquery-qrcode

    直接上代码:(都需要引入jQuery.js  1、引入(jquery.qrcode.min.js)或者引入下边两个文件(jquery.qrcode.js和qrcode.js))

    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8">
            <title>生成二维码</title>
            <!--都需要引入jQuery.js文件-->
            <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
            <!--<script type="text/javascript" src="js/qrcode/jquery.qrcode.min.js"></script>-->
                
            <!--引入上边一个文件(jquery.qrcode.min.js)或者引入下边两个文件(jquery.qrcode.js和qrcode.js)-->
            
            <script src="js/qrcode/jquery.qrcode.js"></script>
            <script src="js/qrcode/qrcode.js"></script>
            <style>
            body{
                text-align: center;
            }
            #qrcode{
                margin:100px auto;
            }
            #text{
                width: 400px;height: 200px;
                border:1px solid #ccc;
            }
            </style>
        </head>
        <body>
            <input type="text" id="text" placeholder="请输入要生成二维码的文本">
            <input type="button" id="create" value="生成二维码">
            <br>
            <div id="qrcode"></div>
            <script type="text/javascript">
                $('#create').click(function(){
                        $('#qrcode').html('').qrcode({
                            text: $('#text').val()
                        });
                })
            </script>
        </body>
    </html>

    文件路径

  • 相关阅读:
    HDU-6315 Naive Operations 线段树
    18牛客第二场 J farm
    POJ
    SPOJ
    codeforces 501C. Misha and Forest
    Codeforces 584C
    Domination
    HDU-3074 Multiply game
    Codefoeces-689D Friends and Subsequences
    Codeforces Round #486 (Div. 3)
  • 原文地址:https://www.cnblogs.com/xiangru0921/p/6652425.html
Copyright © 2011-2022 走看看