Created
March 8, 2014 18:36
-
-
Save gcollazo/9436675 to your computer and use it in GitHub Desktop.
This file contains 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
<html> | |
<body> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> | |
<script> | |
'use strict'; | |
var url = 'https://chart.googleapis.com/chart?cht=qr&chs=150x150&chld=H|0&chl='; | |
$(document).ready(function() { | |
$('#btn').click(function() { | |
var qrurl = url + $('#textField').val(); | |
$('#image').attr('src', qrurl); | |
}); | |
}); | |
</script> | |
<p><input type="text" id="textField"></p> | |
<p><button id="btn">Generate</button></p> | |
<p><img id="image"></p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment