<form id=\"fileload\" action=\"#\" method=\"post\" enctype=\"multipart/form-data\"><input type=\"file\" name=\"anyfile\" id=\"inpField\"/></form>
alert(document.getElementById("inpField").value);
<!DOCTYPE> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1251" /> <title>...</title> </head> <body> <form id="fileload" action="#" method="post" enctype="multipart/form-data"><input type="file" onchange="TestValue(this)" name="anyfile" id="inpField"/></form> <script type="text/javascript"> function TestValue(a){ alert(a.value); } </script> </body> </html>