QRCode.js is javascript library for making QRCode. QRCode.js supports Cross-browser with HTML5 Canvas and table tag in DOM. QRCode.js has no dependencies.
Check it out http://davidshimjs.github.com/qrcodejs/
QRCode.js is javascript library for making QRCode. QRCode.js supports Cross-browser with HTML5 Canvas and table tag in DOM. QRCode.js has no dependencies.
Check it out http://davidshimjs.github.com/qrcodejs/
<input id="text" type="text" value="https://hogangnono.com" style="width:80%" /><br /> | |
<div id="qrcode"></div> |
var qrcode = new QRCode("qrcode"); | |
function makeCode () { | |
var elText = document.getElementById("text"); | |
if (!elText.value) { | |
//alert("Input a text"); | |
elText.focus(); | |
return; | |
} | |
qrcode.makeCode(elText.value); | |
} | |
makeCode(); | |
$("#text"). | |
on("blur", function () { | |
makeCode(); | |
}). | |
on("keydown", function (e) { | |
if (e.keyCode == 13) { | |
makeCode(); | |
} | |
}); |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> | |
<script src="https://cdn.rawgit.com/davidshimjs/qrcodejs/gh-pages/qrcode.min.js"></script> |
#qrcode { | |
width:160px; | |
height:160px; | |
margin-top:15px; | |
} |