用GoogleChart 在网页生成地址二维码

网页内插入Js代码

<style type="text/css">
.eweima{
width:200px;
height:200px;
margin:auto;
float:right;
}
</style>

<div class="eweima">
<script type="text/javascript">
document.write("<img src=\"https://chart.googleapis.com/chart?cht=qr&chs=500x500&choe=UTF-8&chld=L|2&chl="); 
document.write(window.location.href);
document.write("\" width=\"200\" height=\"200\" alt=\"二维码\"/>");
</script>
原文地址:https://www.cnblogs.com/Raywang80s/p/2760170.html