JSFiddle - React, Tailwind, and code Playground
HTML
<h5>Combo Box Test</h5>
<!-- jquery method -->
<input data-cb="1" style="width:250px;" id="test" />
<br/>
<br/>
<!-- html method -->
<input type="text" style="width:250px;" id="test2">
<input type="button" value=" V " style="float: right; position: absolute; z-index: 9999;" ></input>
</input>
JavaScript
$(function () {
$("input[data-cb=1]").each(
function() {
var btn_style = "float: right; position: absolute; z-index: 9999;";
$(this).append("<input type='button' value=' V ' style='" + btn_style + "' />");
}
);
});