<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>hello</title>
</head><body>
<form method="post" enctype="multipart/form-data" action="#" >
<br>
    <input name="filePath" size="100" style="color: green;border: 1px dotted green">
    <input type="button" name="aButton" value="Browse..." onclick="clickFileControl()">
<br>
    <input type="file" name="file" style="display: none;" 
        onchange="filePath.value=this.value" style="border: 1px dotted green">
<br><br>
    <input type="button" name="aButton" value="Submit Form" onclick="submitForm()">
</form></body>
</html>
<script language="JavaScript">
function clickFileControl(){
    document.forms[0].file.click();
    document.forms[0].filePath.value = document.forms[0].file.value;
    //alert(document.forms[0].file.value);
}
function submitForm(){
    alert(document.forms[0].file.value);
    document.forms[0].submit();
}
</script>