Serlok App
Script text to barcode generator
Script text to barcode generator
Mmmmmmmm
<!DOCTYPE html> <html lang="id"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <title>Generator Barcode</title> <script src="https://cdn.jsdelivr.net/npm/jsbarcode@3.11.6/dist/JsBarcode.all.min.js"></script> <style> body { font-family: sans-serif; padding: 20px; background: #f5f5f5; text-align: center; } input, button { padding: 10px; font-size: 16px; margin: 5px; } #barcode { margin-top: 20px; } </style> </head> <body> <h2>🔠Generator Barcode dari Teks</h2> <input type="text" id="text" placeholder="Masukkan teks..." /> <button onclick="generateBarcode()">🔄 Buat Barcode</button> <svg id="barcode"></svg> <script> function generateBarcode() { const value = document.getElementById("text").value; if (value.trim() === "") { alert("Tolong masukkan teks dulu ya, Pak!"); return; } JsBarcode("#barcode", value, { format: "CODE128", lineColor: "#000", width: 2, height: 80, displayValue: true }); } </script> </body> </html>
Select All
Copy
Tidak ada komentar:
Posting Komentar
Posting Lebih Baru
Posting Lama
Beranda
Beranda
Lihat Demo
Serlok App
Tentang
Tidak ada komentar:
Posting Komentar