JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" id="barcode" />
JavaScript
$('#barcode').keypress(function(e) {
if (e.which == 13 && this.value) {
alert("This works!")
}
})
<input type="text" id="barcode" />
$('#barcode').keypress(function(e) {
if (e.which == 13 && this.value) {
alert("This works!")
}
})