homepage/source/qr/index.html.slim

25 lines
881 B
Plaintext
Raw Normal View History

2013-02-20 22:18:23 +00:00
== javascript_include_tag "qrcode.js"
== javascript_include_tag "html5-qrcode.js"
h1
| QRCode Generator Example
2013-09-19 07:01:52 +00:00
form#QRform.pure-form name="QRform"
2013-02-20 22:18:23 +00:00
textarea cols="50" name="textField" onclick="this.focus();this.select();" onkeyup="updateQRCode(this.value)" rows="8" I love QR Codes. Type in here and watch the QR code below update.
// This is where our QRCode will appear in.
#qrcode
javascript:
function updateQRCode(text) {
var element = document.getElementById("qrcode");
var bodyElement = document.body;
if(element.lastChild)
element.replaceChild(showQRCode(text), element.lastChild);
else
element.appendChild(showQRCode(text));
}
updateQRCode('I love QR Codes. Type in here and watch the QR code below update.');
p
a href="https://github.com/amanuel/JS-HTML5-QRCode-Generator" onmouseover="updateQRCode(this.href)" Project Homepage