jquery generates two-dimensional code

Source: Internet
Author: User

Download Demo

JS Download: jquery-1.8.3.js ,qrcode.js,jquery.qrcode.js

<! DOCTYPE html>"UTF-8"><title></title> <script src="Js/jquery-1.8.3.js"Type="Text/javascript"></script> <script src="Js/qrcode.js"Type="Text/javascript"></script> <script src="Js/jquery.qrcode.js"Type="Text/javascript"></script> <script type="Text/javascript">$ (function () {$ ("#div_div"). QRCode ({render:"Table", Text:utf16to8 ("https://www.baidu.com/s?ie=utf-8&f=8&rsv_bp=1&rsv_idx=1&tn=baidu&wd=jquery.qhttps:// www.baidu.com/s?ie=utf-8&f=8&rsv_bp=1&rsv_idx=1&tn=baidu&wd=jquery.qrcode&rsv_pq= ec12d2fe0000e0ef&rsv_t=8e7aijc6zvykj9yr3vq3ek0idlyryvblh%2bu9hjbctgcvs7ag6sdispeocb4&rsv_enter=0& Inputt=564&rsv_n=2&rsv_sug3=3&rsv_sug1=2&rsv_sug4=564rcode&rsv_pq=ec12d2fe0000e0ef&rsv _t=8e7aijc6zvykj9yr3vq3ek0idlyryvblh%2bu9hjbctgcvs7ag6sdispeocb4&rsv_enter=0&inputt=564&rsv_n=2 &rsv_sug3=3&rsv_sug1=2&rsv_sug4=564?ie=utf-8&f=8&rsv_bp=1&rsv_idx=1&tn=baidu& Wd=jquery.qhttps://www.baidu.com/s?ie=utf-8&f=8&rsv_bp=1&rsv_idx=1&tn=baidu&wd= jquery.qrcode&rsv_pq=ec12d2fe0000e0ef&rsv_t=8e7aijc6zvykj9yr3vq3ek0idlyryvblh% 2bu9hjbctgcvs7ag6sdispeocb4&rsv_enter=0&inputt=564&rsv_n=2&rsv_sug3=3&rsv_sug1=2&rsv_ Sug4=564rcode&rsv_pq=ec12d2fe0000e0ef&rsv_t=8e7aijc6zvYkj9yr3vq3ek0idlyryvblh%2bu9hjbctgcvs7ag6sdispeocb4&rsv_enter=0&inputt=564&rsv_n=2&rsv_sug3=3 &rsv_sug1=2&rsv_sug4=564"), Width: $, Height: $}); }) function Utf16to8 (str) {//transcodingvar  out, I, Len, C; out=""; Len=str.length; for(i =0; i < Len; i++) {C=str.charcodeat (i);if(c >=0x0001) && (c <=0x007F)) {  out+=Str.charat (i);} Else if(C >0x07ff) {  out+ = String.fromCharCode (0xE0| (c >> A) &0x0F));  out+ = String.fromCharCode (0x80| (c >>6) &0x3F));  out+ = String.fromCharCode (0x80| (c >>0) &0x3F)); } Else {  out+ = String.fromCharCode (0xC0| (c >>6) &0x1F));  out+ = String.fromCharCode (0x80| (c >>0) &0x3F)); } } return  out; } </script> "text"Id="text"/> <input type="Button"Value="Build"Id="BT"/> <div id="Div_div"style="width:400px;height:400px;border:1px solid #000;"></div> </body> 

jquery generates two-dimensional code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.