JSFiddle - React, Tailwind, and code Playground
by honglonglong
HTML
<input type="text" id="txtFu"/>
<input type="button" id="Fu" Value="Upload File"/>
<div id="d" style="display:none;"> <input type="file" id="Fu1"/>
<div>
JavaScript
//$("#Fu").attr("value", "abc");
//alert($("#Fu").parent().parent().html());
$("#Fu").click(function() {
$("#Fu1").trigger("click");
$("#Fu1").trigger("focus");
});
$("#Fu1").change(function(){
alert($(this).val());
$("#txtFu").val($(this).val());
});