1. 程式人生 > >JS實現帶有logo的二維碼

JS實現帶有logo的二維碼

<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>該二維碼支援中文和LOGO</title>

		<script type="text/javascript" src="jquery-1.8.0.js"></script>
		<script type="text/javascript" src="utf.js"></script>
		<script type="text/javascript" src="jquery.qrcode.js"></script>
		<script type="text/javascript">
			$(document).ready(function() {
				$("#qrcode").qrcode({
					render : "canvas",  
					text : "http://my.csdn.net/sly_1995",  
					width : "200",              
					height : "200",            
					src: '1.jpg' 
				});
			});
		</script>
	</head>
	<body>
	    <div id="qrcode"></div>
	</body>
</html>