Copy Code code as follows:
<body>
<input type=file id= "J" onchange= "GetValue ();" Style= "-moz-opacity:0;filter:alpha (opacity=0); opacity:0;position : absolute;left:166px; "/>
<input id= "Ye" style= "color:green;border:1px solid green;width:300px;"/>
<input type= "button" value= "File" style= "border:1px solid;" green;width:80px
</body>
<script language= "JavaScript" >
function GetValue () {
document.getElementById (' ye '). Value = document.getElementById (' j '). Value;
}
</script>
Ideas:
1, the stubborn file domain is <input type=file/> Transparency: style= "-moz-opacity:0;filter:alpha (opacity=0); opacity:0;"
2, with a text box and buttons in place of the file and the appearance
3. Put the browse button of the file field above the button we wrote
4, use JS to get the value of the file field change is: The resulting file path, and assigned to the text box value, so OK
I am just experimenting, the style is very simple, actually can further beautify;
The advantage of this is that it simply simulates the appearance of the file field, which is actually working with file field files, which is convenient.