file:
   




Source code gornjeg primjera izgleda ovako:
<html> <head> <title>HTML obrasci -primjer</title> <script type="text/javascript" language="JavaScript"> function ispis(){ var x=document.forms[0].fajl.value; alert("Izabrali ste fajl: \n"+x); } </script> </head> <body bgcolor="yellow"> <form action="javascript: ispis()" method="POST"> file: <input type="file" name="fajl" size="50"> <br><input type="Submit" value="Potvrdi">&nbsp;&nbsp;&nbsp; <input type="Reset"> </form> </body> </html>