window.onload = function() { UpdateQRCode(window.location.href); };
function UpdateQRCode(val){ document.getElementById("qrcode").setAttribute("src","https://api.mimfa.net/qrcode?value="+encodeURIComponent(val)+"&as=value"); } document.addEventListener("DOMContentLoaded", function(){ UpdateQRCode(document.getElementById("qrcode").value); });