Created
March 1, 2019 14:01
-
-
Save ugeugeHigh/b347a62455081e0c6872de74256c3959 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> | |
<script src="jquery.qrcode.js"></script> | |
<script src="qrcode.js"></script> | |
<link href="css/style.css" rel="stylesheet"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<script> | |
$(function() { | |
var url; | |
$('#send').click(function () { | |
url = $('#text').val(); | |
console.log(url); | |
if(url != '') { | |
$("canvas").remove(); | |
$("#qrcode").html(); | |
$("#qrcode").qrcode({text: url}); | |
} | |
}); | |
}); | |
</script> | |
<title>QR code generator</title> | |
</head> | |
<body> | |
<header> | |
<h1 id="title">QR code generator</h1> | |
</header> | |
<div id="wrap"> | |
<h3>generating QR codes</h3> | |
<form> | |
<input type="text" id="text"> | |
<input type="button" value="send" id="send"> | |
</form> | |
<div id="qrcode"></div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment