JSFiddle - React, Tailwind, and code Playground
HTML
<input id="cmd" type="text" class="cmd"/>
CSS
.cmd {
border: none;
background-color: #fff;
background: transparent;
outline: none;
}
JavaScript
$( "#cmd" ).keypress(function(e) {
if (e.which == 13) {
try{
alert($("#cmd").val());
console.log(eval($( "#cmd" ).val()));
}
catch(err){
console.log(err);
}
}
});
/*var url = "https://code.jquery.com/color/jquery.color.js";
$.getScript( url, function() {
});*/