Mega Code Archive

 
Categories / JavaScript Tutorial / Form
 

FileUpload select()

The select() method selects the input area of the upload field. <html>     <head>     <title>Using select() method of the FileUpload object</title>     </head>     <body>     <script language = "JavaScript">     <!--     function enterName(){          document.form1.uploadbox.select();     }     -->     </script>     <form name="form1">     <input type="file" name="uploadbox">     <br><br>     <input type="button" value="Go to Filename Box" onClick="enterName()">     </body>     </form>     </html>