codice:<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Code Example by DYNAMIC+</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta http-equiv="Content-Language" content="en-us" /> <script type="text/javascript"> <!-- function showFileName( __hForm ) { var _fileName = __hForm.elements['file'].value; var _lastSlash = _fileName.lastIndexOf( '\\' ) + 1; if ( _lastSlash < 1 ) _lastSlash = 0; alert( "Il nome del file è: " + _fileName.substring( _lastSlash ) ); } //--> </script> </head> <body> <div style="text-align: center;"> <form action="#" onsubmit="showFileName( this ); return false;"> <input type="file" name="file" /> <input type="submit" value=" Mostra nome del file " /> </form> </div> </body> </html>