很多人很想知道怎么扫一扫二维码就能打开网站,就能添加联系人,就能链接wifi,今天做个demo(续集)

  • 时间:
  • 浏览:0

            <p>请输入内容否则点击按钮生成二维码:</p>

            //URL演示

                outputQRCod(urlTxt, 30, 30);

                    out += String.fromCharCode(0x30 | ((c >> 0) & 0x3F));

            <div id="code"></div>

                render: "table",

                var txt = "WIFI:T:" + $('#WiFiType').val() + ";S:" + $('#inputWiFiName').val() + ";P:" + $('#inputWiFiPass').val() + ";;";

            //普通转换

                <br />

                    out += String.fromCharCode(0x30 | ((c >> 6) & 0x3F));

    <script type="text/javascript">

            $("#code").empty();

                <input type="button" id="wifi_btn" value="生成二维码">

            </p>

<html>

            out = "";

            </p>

                    <option value="WEP">WEP</option>

            <p>

            //中文格式转换

</head>

                outputQRCod(txt, 30, 30);

            });

            for (i = 0; i < len; i++) {

            });

            len = str.length;

                height: height,

            </p>

                }

                outputQRCod($("#inputTxt").val(), 30, 30);

            <h2>演示1:</h2>

        //中文字符处里

        function toUtf8(str) {

        }

<!DOCTYPE HTML>

            $("#code").qrcode({

                <br />

                职位:<input type="text" class="input" id="inputPost" value=""><br />

            //没人中文就还需用没人简单

        $(function () {

            $("#url_btn").click(function () {

                width: width,

                WiFi密码:<input type="text" class="input" id="inputWiFiPass" value=""><br />

                <br />

            return out;

            $("#txt_btn").click(function () {

                <br />

            <h2>演示3:</h2>

        function outputQRCod(txt, width, height) {

            <h2>演示4:(现在的wifi一般不是WPA的,WEP的基本上10分钟内就能破解了)</h2>

                } else {

<head>

            });

</html>

                WiFi名称:<input type="text" class="input" id="inputWiFiName" value=""><br />

            <p>

                邮箱:<input type="text" class="input" id="inputEmail" value=""><br />

                    out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F));

                公司:<input type="text" class="input" id="inputCompany" value=""><br />

                var txt = "BIZCARD:N:" + $('#inputName').val() + ";T:" + $('#inputPost').val() + ";C:" + $('#inputCompany').val() + ";A:" + $('#inputAddress').val() + ";B:" + $('#inputMobile').val() + ";E:" + $('#inputEmail').val() + ";;";

                <br />

                text: str

        <div class="demo">

                <input type="button" id="txt_btn" value="生成二维码">

            var out, i, len, c;

</body>

<body>

            $("#people_btn").click(function () {

            $("#wifi_btn").click(function () {

                if ((c >= 0x0001) && (c <= 0x007F)) {

    <script src="JavaScript/jquery-1.8.3.min.js"></script>

            }

        });

        }

    <meta charset="utf-8">

                console.log(txt);

                普通文本:<input type="text" class="input" id="inputTxt" value="">

                <br />

                <br />

                URL 演示:<input type="text" class="input" id="inputUrl" value="">

                }

        //生成二维码

            var str = toUtf8(txt);

                    out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));

        </div>

                    out += String.fromCharCode(0x30 | ((c >> 0) & 0x3F));

            //先清空

                <br />

                } else if (c > 0x07FF) {

                地址:<input type="text" class="input" id="inputAddress" value=""><br />

            //WiFi连接演示

                    <option value="nopass">无加密</option>

                姓名:<input type="text" class="input" id="inputName" value=""><br />

            <h2>演示2:</h2>

    <title>生成二维码</title>

            //联系人打上去演示

            <p>加联系人:(选填)<input type="button" id="people_btn" value="生成二维码"></p>

                <input type="button" id="url_btn" value="生成二维码">

                outputQRCod(txt, 30, 30);

                </select>

            });

                WiFi类型:<select id="WiFiType"><option value="WPA">WPA/WPA2</option>

    </script>

    <script src="JavaScript/jquery.qrcode.min.js"></script>

                手机:<input type="text" class="input" id="inputMobile" value=""><br />

            });

                    out += str.charAt(i);

            </p>

    <div id="main">

                c = str.charCodeAt(i);

            //生成二维码

    </div>

            <p>

                var urlTxt = $("#inputUrl").val();

            <p>