二维码生成的方法

<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">

	<script type="text/javascript" src="https://static.runoob.com/assets/qrcode/qrcode.min.js"></script>
	<title></title>
</head>

<body>
	<div id="qrcode"></div>
	<script type="text/javascript">
		var qrcode = new QRCode(document.getElementById("qrcode"), {
     
			text: "这里是放置url的地方",
			width: 90,
			height: 90,
			colorDark: "#000",
			colorLight: "#fff",
			correctLevel: 0 // 二维码结构复杂性 0~3
		});
	</script>
</body>

</html>

你可能感兴趣的:(js学习总结)