I've build a website that read barcode from the camera. I can catch the barcode text and print it to the P element as you can see below. But I want to see it in textbox. Is this possible? I can't see the barcode at value of the textbox.
After press the Scan Barcode button:(5901234123457 is scanned barcode. I want to see it in textbox)

<p id="code">I see the scanned value here</p>
<input class="form-control" type="text" id="code" value="Scanned barcode must be seen here...">
<button onclick="barkod()" type="submit" class="btn btn-primary btn-sm">Scan Barcode</button>
<script>
function barkod() {
var resultElement = document.getElementById("code");
setupLiveReader(resultElement)
}
</script
