Html – How to rename HTML “browse” button of an input type=file


How to rename the browse button as "Select the file"? E.g.:

<input type=file name=browse >

Best Solution

<script language="JavaScript" type="text/javascript">
function HandleBrowseClick()
    var fileinput = document.getElementById("browse");;
function Handlechange()
var fileinput = document.getElementById("browse");
var textinput = document.getElementById("filename");
textinput.value = fileinput.value;

<input type="file" id="browse" name="fileupload" style="display: none" onChange="Handlechange();"/>
<input type="text" id="filename" readonly="true"/>
<input type="button" value="Click to select file" id="fakeBrowse" onclick="HandleBrowseClick();"/>