星空网 > 软件开发 > Java

在线生成二维码代码实例

在线生成二维码代码实例:
现在二维码似乎已经成了一个流行元素,随便一个网站都要挂上一个二维码,供用户扫描,当然是否真的有用户去扫描就不得而知了,既然如此流行,那就介绍一下如何实现在线生成二维码。
使用jquery.qrcode插件可以实现此功能,在线开源地址是:

 

https://github.com/jeromeetienne/jquery-qrcode

 

function toUtf8(str) {  var 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>>12)&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; }

原文地址是:http://www.softwhy.com/forum.php?mod=viewthread&tid=8756

更多内容可以参阅:http://www.softwhy.com/jquery/

 




原标题:在线生成二维码代码实例

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

美国小包空运:https://www.goluckyvip.com/tag/102621.html
空运小包专线什么意思:https://www.goluckyvip.com/tag/102622.html
空运小包什么意思:https://www.goluckyvip.com/tag/102623.html
空运货物怎么发:https://www.goluckyvip.com/tag/102624.html
国际空运小包物流:https://www.goluckyvip.com/tag/102625.html
空运怎么发货:https://www.goluckyvip.com/tag/102626.html
仿品独立站从建站、推广、收款到底怎么玩?:https://www.kjdsnews.com/a/1836312.html
仿品独立站从建站、推广、收款到底怎么玩?:https://www.goluckyvip.com/news/186215.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流