Created
August 12, 2013 17:00
-
-
Save Jorgelig/6212842 to your computer and use it in GitHub Desktop.
A CodePen by Sangmin, Shim. Cross-browser QRCode - 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/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input id="text" type="text" value="http://jindo.dev.naver.com/collie" style="width:80%" /><br /> | |
<div id="qrcode"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#qrcode { | |
} width:160px; | |
height:160px; | |
margin-top:15px; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment