JavaScript Local picture viewer
JavaScript
Download (.zip)
<head> <script> function display_image(image) { menues="toolbar=no,location=no,directories=no,status=no,menubar=no"; size=",scrollbars=no,resizable=no,width=200,height=300"; settings=menues+size; myWindow = window.open("", "Preview", settings); myWindow.document.writeln("<center><img src='" +image+ "'>"); myWindow.document.writeln("<FORM><INPUT TYPE='button' VALUE='Close' " + "onClick='window.close()'></FORM></center>"); myWindow.document.close(); } </script> </head> <body> <input type="file" Size="40" name="url"> <input TYPE="button" VALUE="View Pic" onClick="display_image(document.all.url.value)"> </p> <br> </body>
|