close
<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”>
<!– Real Input field, but hidden–>
<input type=”file” name=”myFile” style=”display: none”>
<!– Fake field to fool the user –>
<input type=”text” name=”txtFakeText” readonly=”true”>
<!– Button to invoke the click of the File Input –>
<input type=”button” onclick=”HandleFileButtonClick();” value=”Upload File” style=”background: red;”>
</form>
</body>
</html>
詳細出處在下面
全站熱搜
留言列表