How do I embed a QR code in a Web page with the Internet API?
With the growing popularity of smartphones and tablets, QR codes have become a bridge between smart terminals and traditional websites. In the following, I will introduce a few real-time generation of two-dimensional code of the Web API, I hope to simplify the web design process of the two-dimensional code integration work.
1. Example One
The code above produces the following two-dimensional code image:
650) this.width=650; "src=" http://qrickit.com/api/qr?d=http://www.taobao.com "/>
The Web API also supports the following features,
A descriptive text; for example Addtext=hello world
text color; For example Txtcolor=442eff
Two-dimensional code color; for example fgdcolor=76103c
background color; For example bgdcolor=c0f912
Two-dimensional code size; for example qrsize=300
image format; For example, T=P, referring to the output PNG format
Error correction ability; For example, e=m, 15% error correction ability;
For the above example, the following settings
&bgdcolor=c0f912&qrsize=300&t=p&e=m ">
The resulting two-dimensional code effect is as follows,
650) this.width=650; "Src=" http://qrickit.com/api/qr?d=http://www.taobao.com&addtext=hello+world& Txtcolor=442eff&fgdcolor=76103c%20&bgdcolor=c0f912&qrsize=300&t=p&e=m "alt=" www.taobao.com &addtext=hello+world&txtco "/>
2. Example Two
Google provides a two-dimensional code generated by the API, usually need to provide two-dimensional code size and generate two-dimensional code source information, the use of the following,
An interesting use is to use two-dimensional code to make calls, such as the following information to identify, click on the corresponding information, it will call the corresponding phone, this way for those who do not like dialing the number of users should be very useful.
http://chart.apis.google.com/chart?cht=qr&chs=200x200&chl=tel:19172073420
650) this.width=650; "src=" http://chart.apis.google.com/chart?cht=qr&chs=200x200&chl=tel:19172073420 "/ >
For more information about the Google API, please refer to this link, Google QR encoder API
3. Example Three
http://goqr.me/api/may be the most comprehensive API supported by the QR Code API, which supports online generation, but also provides online parsing, but the author experimented with the slow response of the server and was not suitable for practical applications. Use the following,
In the actual application of the QR code, we often want to be able to parse the content of the two-dimensional code on the PC, of course, if you have a camera, nature is not a problem, but even if there is no camera, you can use the software to solve, Chrome has a plug-in support right-click parsing QR code problem, detailed use please refer Chrome QR Code Extension
This article is from the "I Am Chu Crazy" blog, please be sure to keep this source http://xjfengck.blog.51cto.com/8231459/1423709