如何让网页自动生成二维码图支持静态动态网页
标签:
代码二维码宇程网络网站制作it |
分类: 互联网知识 |
支持所有静态和动态网页页面,生成二维码可用手机软件我查查、魔码、微信等软件利用手机摄像头扫描,即可实现手机获得二维码内信息(网页网址),手机即可浏览器打开浏览对应网页。
二、自动生成二维码代码
<script
type="text/javascript">
thisURL = document.URL;
strwrite = "<img src='https://chart.googleapis.com/chart?cht=qr&chs=150x150&choe=UTF-8&chld=L|4&chl=" + thisURL + "' width='150' height='150' alt='网址URL 二维码生成' />";
document.write( strwrite );
</script>
直接复制以上二维码自动生成JS代码即可使用。
http://www.divcss5.com/uploads/allimg/130516/1_130516170513_1.png
三、二维码自动生成代码如何使用
只需要在需要显示地方放入二维码JS代码即可,打开网页即可显示。
本二维码生成使用是google谷歌JS,加载快速、兼容所有浏览器、兼容动态网页、静态html网页。
网页自动生成二维码代码:
<script
type="text/javascript">
thisURL = document.URL;
strwrite = "<img
src='https://chart.googleapis.com/chart?cht=qr&chs=150x150&choe=UTF-8&chld=L|4&chl="
+ thisURL + "' width='150' height='150' alt='网址URL 二维码生成'
/>";
document.write( strwrite );
< /script>

加载中…