<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>

詳細出處在下面

http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=154

arrow
arrow
    全站熱搜

    包爾伯 發表在 痞客邦 留言(0) 人氣()