This commit is contained in:
KANE LAZENI 2026-02-08 04:02:21 +00:00
parent 05a6d3e71b
commit f6b2986499

View File

@ -13,6 +13,11 @@
</div>
<?php endif; ?>
<div>
<h1>Welcome to NFC Tools KBC - Test Page</h1>
<p>Launch NFC Tools KBC, focus this web page then scan a tag. Current status:</p>
<p id="kbc-target">Waiting for a tag</p>
</div>
<script type="text/javascript">
/**
@ -76,4 +81,19 @@
}
};
})();
// Wait for the HTML document has been completely loaded and parsed
document.addEventListener("DOMContentLoaded", function(event) {
// Here we register a callback function to get the NFC tag's content
NFCToolsKBC.getInstance().registerCallback(function(content){
// Do what you want here with the content
// For the demo, we show the content in a HTML element
var target = document.getElementById("kbc-target");
target.innerHTML = "Content detected: " + content;
});
});
</script>