thisURL = document.URL; strwrite = """."/> thisURL = document.URL; strwrite = """.">

Home >CMS Tutorial >DEDECMS >How does DEDECMS generate QR codes for each page?

How does DEDECMS generate QR codes for each page?

藏色散人
藏色散人Original
2020-01-07 09:22:292877browse

How does DEDECMS generate QR codes for each page?

How does DEDECMS generate QR codes for each page?

DreamWeaver DEDECMS generates QR codes for each page

Recommended learning:Dreamweavercms

The QR code generation is actually It's very simple, but it would be too inhumane to have the same QR code no matter which page it is on. The code provided today can easily automatically generate a matching QR code based on the current URL address. No need to For the help of any plug-in, just put the following code directly in the web page code. The width and height are the width and height of the QR code:

<script>
thisURL = document.URL;
strwrite = "<img src=&#39;https://chart.googleapis.com/chart?cht=qr&chs=150x150&choe=UTF-8&chld=L|4&chl=" + thisURL + "&#39; width=&#39;150&#39; height=&#39;150&#39; alt=&#39;QR 码&#39; />";
document.write( strwrite );
</script>

The above is the detailed content of How does DEDECMS generate QR codes for each page?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn