JSFiddle - React, Tailwind, and code Playground
HTML
Transporte : <input type="text" id="transporte" value="">
<button id="btnSend" onclick="javascript:checkValue();">Send</button>
JavaScript
function checkValue() {
var _transporteNode = document.getElementById("transporte");
if(_transporteNode) {
_transporteNode.value = _transporteNode.value || 0;
}
}