Mega Code Archive

 
Categories / JavaScript Tutorial / Form
 

FileUpload value

The value property specifies the filename of the file selected or input by the user. <html>     <head>     <title>Using the value property of the FileUpload object</title>     </head>     <body>     <script language="JavaScript">     <!--     function showFile(){          var input = document.form1.uploadbox.value;          alert("The filename entered is: " + input);     }     -->     </script>     <form name="form1">     Please select a file.     <input type="file" name="uploadbox">     <br><br>     Click on the button to see the value of the FileUpload object.     <br>     <input type="button" value="Submit" onClick=showFile()>     </form>     </body>     </html>