分類
<style> *{ margin:0; padding:0; } body{ background-color: #262626; } #box{ width:1000px; height:600px; margin:200px auto; } #box .qrcode{ width:400px; height: 400px; float: left; margin: 40px 40px; } #box .introduce{ width:500px; height: 600px; float: left; } .introduce p{ width:200px; height: 40px; background: #333; float: left; margin:10px 20px; color:#fff; border-radius: 5px; overflow: hidden; } .introduce p span{ float: left; width:50px; height:40px; color:#fff; text-align: center; line-height: 40px; } .introduce p input{ width:150px; height:40px; float: left; border: 0; color:#fff; background:#000; text-indent:10px; outline: none; } .introduce .btn{ width:440px; height:40px; text-align: center; line-height: 40px; background: #6c0; } .qrcode>img{ display: block;border:5px solid white; } </style>
<script src="js/jquery.min.js"></script> <script src="js/qrcode.js"></script>
<div id="box"> <h3 style="color: aliceblue">請用微信搜生成的二微碼,查看效果</h3> <div class="introduce"> <p> <span>姓名:</span> <input type="text" id="name" value="光頭強"> </p> <p> <span>公司:</span> <input type="text" id="company" value="李老板伐木有限公司"> </p> <p> <span>職務:</span> <input type="text" id="title" value="伐木員"> </p> <p> <span>地址:</span> <input type="text" id="address" value="黑龍江省哈爾濱市南唐鎮狗熊嶺"> </p> <p> <span>手機:</span> <input type="text" id="mobile" value="13818585858"> </p> <p> <span>郵箱:</span> <input type="text" id="email" value="guangtouqiang@163.com"> </p> <p> <span>網址:</span> <input type="text" id="web"> </p> <p> <span>備注:</span> <input type="text" id="desc" > </p> <p class="btn">開啟通訊錄</p> </div> <div class="qrcode" id="qrcode"></div> </div> <script> var name, company, title, address, mobile, email, web, desc; $(".btn").click(function() { name = "FN:" + $("#name").val() + "\n"; //姓名 company = "ORG:" + $("#company").val() + "\n"; //公司 title = "TITLE:" + $("#title").val() + "\n"; //職務 address = "WORK:" + $("#address").val() + "\n"; //地址 mobile = "TEL:" + $("#mobile").val() + "\n"; //手機 email = "EMAIL:" + $("#email").val() + "\n"; //郵箱 web = "URL:" + $("#web").val() + "\n"; //網址 desc = "NOTE:" + $("#desc").val() + "\n"; //備注 var info = "BEGIN:VCARD\n" + name + company + title + address + mobile + email + web + desc + "END:VCARD"; //console.log(info); //生成二維碼 var qrcode = new QRCode("qrcode"); qrcode.makeCode(info); }) </script>
1. 本站所有素材(未指定商用),僅限學習交流。
2. 會員在本站下載的原創商用和VIP素材后,只擁有使用權,著作權歸原作者及17素材網所有。
3. 原創商用和VIP素材,未經合法授權,請勿用于商業用途,會員不得以任何形式發布、傳播、復制、轉售該素材,否則一律封號處理。
4. 本平臺織夢模板僅展示和個人非盈利用途,織夢系統商業用途請預先授權。