xxxxxxxxxx
<!DOCTYPE html>
<html lang="en">
<head>
<title>Generating QR Code</title>
<!-- Reference the qrcode library -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
</head>
<body>
<!-- Create a container for the QR code -->
<div id="qrcode-container"></div>
<!-- A button that is used to create QR code -->
<button id="create-qrcode">CREATE QR Code</button>
</body>
<script>
// Create QR code when button is clicked
document.getElementById("create-qrcode").addEventListener("click", () => {
// new QRCode(Target container, text to encode)
var qrc = new QRCode(
document.getElementById("qrcode-container"),
"https://www.wissamfawaz.com/index.htm"
);
});
</script>
</html>
xxxxxxxxxx
<script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js" ></script>
// Get the div element where you want to add the QR code
const qrCodeDiv = document.getElementById('receive-qr-code');
// Create a new QR code instance
const qrCode = new QRCode(qrCodeDiv, {
text: 'TEXT HERE', // The text you want to encode in the QR code
width: 256, // The width of the QR code in pixels
height: 256, // The height of the QR code in pixels
colorDark: '#000000', // The color of the dark squares in the QR code
colorLight: '#ffffff', // The color of the light squares in the QR code
version: 10,
});
// Optionally, you can also customize the QR code by setting additional properties on the qrCode object
// Add the QR code to the div element
qrCode.makeCode();
xxxxxxxxxx
const QRCode = require('qrcode');
const path = require('path');
QRCode.toFile(path.join(__dirname, 'qrcode.png'), 'put your data here', (err)=>{
if (err) throw err;
});
xxxxxxxxxx
<script src="https://cdnjs.cloudflare.com/ajax/libs/qrious/4.0.2/qrious.min.js"></script>
xxxxxxxxxx
var qrcode = new QRCode("test", {
text: "http://jindo.dev.naver.com/collie",
width: 128,
height: 128,
colorDark : "#000000",
colorLight : "#ffffff",
correctLevel : QRCode.CorrectLevel.H
});
xxxxxxxxxx
// Import the QRCode library using a CDN or by installing the library using npm/yarn
// Initialize a QRCode Generator object
const qrGenerator = new QRCodeGenerator();
// Generate the QR Code
const qrCode = qrGenerator.generate("Hello World");
// Display the QR Code
document.getElementById("qrCodeContainer").innerHTML = qrCode;
xxxxxxxxxx
<div id="qrcode"></div>
<script type="text/javascript">
new QRCode(document.getElementById("qrcode"), "http://jindo.dev.naver.com/collie");
</script>
xxxxxxxxxx
<script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
xxxxxxxxxx
<script>
alert('heey kamu , iyaa kamu yang buka barcode ini ada salam dari iljis')
var nama = prompt('kalem kalem ini siapa sih kalo boleh tau?');
if (nama) {
alert('halooo '+nama+' :D');
alert('selamat ulang tahun yaa '+nama+' semoga sehat selalu dan sukses di masa depan kelak :D')
alert('sebelum nyaa maaf aku cuma bisa ngasih hadiah kecil kecilan, silahkan dinikmati tiati samyang nya pedes lhoo, tapi ga sepedes omongan tetangga heheh XD ');
} else {
alert('dihh sombong gamau ngasih tau nama');
}
</script>