<html>
<head>
<title>File Upload Example</title>
<script language="JavaScript" type="text/javascript">
function HandleFileButtonClick()
{
document.frmUpload.myFile.click();
document.frmUpload.txtFakeText.value = document.frmUpload.myFile.value;
}
</script>
</head>
<body>
<form name="frmUpload">
<input type="file" name="myFile" style="display: none">
<input type="text" name="txtFakeText" readonly="true">
<input type="button" onclick="HandleFileButtonClick();" value="上传文件" style="background:red">
</form>
</body>
</html>
<head>
<title>File Upload Example</title>
<script language="JavaScript" type="text/javascript">
function HandleFileButtonClick()
{
document.frmUpload.myFile.click();
document.frmUpload.txtFakeText.value = document.frmUpload.myFile.value;
}
</script>
</head>
<body>
<form name="frmUpload">
<input type="file" name="myFile" style="display: none">
<input type="text" name="txtFakeText" readonly="true">
<input type="button" onclick="HandleFileButtonClick();" value="上传文件" style="background:red">
</form>
</body>
</html>