Skip to content

segdeha/qrcodejs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QRCode.js

QRCode.js is a JavaScript library for generating QR codes. QRCode.js supports cross-browser compatibility with HTML5 Canvas and table tag in the DOM.

QRCode.js has no dependencies.

This fork has the following patches applied:

Basic Usages

<div id="qrcode"></div>
<script type="text/javascript">
new QRCode(document.getElementById("qrcode"), "https://example.com");
</script>

or with some options

<div id="qrcode"></div>
<script type="text/javascript">
var qrcode = new QRCode(document.getElementById("qrcode"), {
	text: "https://example.com",
	width: 128,
	height: 128,
	colorDark: "#000000",
	colorLight: "#ffffff",
	correctLevel: QRCode.CorrectLevel.H,
    useUtf8Bom: false,
    borderWidth:2,
    autoAlignment:false,
});
</script>

and you can use some methods

qrcode.clear(); // clear the code.
qrcode.makeCode("https://example.com"); // make another code.

Browser Compatibility

IE6~10, Chrome, Firefox, Safari, Opera, Mobile Safari, Android, Windows Mobile, etc.

License

MIT License

About

Cross-browser QR code generator for JavaScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 94.7%
  • HTML 5.3%