<script src="jquery.qrcode-0.12.0.min.js"></script>
<div id="qr"></div>
<script>
var url = "http://phpff.com";
$("#qr").qrcode({
"size": 100,
"color": "#3a3",
"text": url
});
</script>
jQuery.qrcode 插件地址
[web]: http://larsjung.de/qrcode/
[github]: https://github.com/lrsjng/jquery-qrcode