JS生成二维码
效果图
实现代码
<!doctype html>
<html>
<head>
<title>qrcode</title>
<style type="text/css">
</style>
</head>
<body>
<input type="text" oninput="change(event)">
<div id="qrcode"></div>
<script type="text/javascript" src="./qrcode.js"></script>
<script type="text/javascript">
function change(event){
// console.log(event.target.value);
document.getElementById("qrcode").innerHTML = "";
new QRCode(document.getElementById("qrcode"), event.target.value); //生成二维码
}
</script>
</body>
</html>