JSFiddle - React, Tailwind, and code Playground
HTML
<input id="hello+2" value="wagon" />
JavaScript
alert($('#hello\\+2').val());
alert(document.getElementById('hello+2').value);
<input id="hello+2" value="wagon" />
alert($('#hello\\+2').val());
alert(document.getElementById('hello+2').value);