Javascript| Upload
<title>upload image</title>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<body bgcolor= "#FFFFFF" text= "#000000" >
<form name= "Iupload" action= "upfile.asp" method= "POST" >
<p><input type= "File" Name= "Picsrc" size= ">"
<input type= "button" value= "Upload" ></p></form>
<p></p>
</body>
<script language= "JavaScript" >
<!--
function Imgexceedsize (w,h) {
if (!document. iupload.picsrc.value== "") {
if (picshow.width>w| | PICSHOW.HEIGHT>H) {
Alert ("Image size: +picshow.width+" X "+picshow.height+"). \\n Image size is too big! You can only upload the size "+w+" x "+h+" image, please browse the picture again! ");
return true;
}else{
return false;
}
}else{
return true;
}
}
function Detect () {
var ok=imgexceedsize (50,50);
if (OK) {
Document. Iupload.reset ();
}else{
Document. Iupload.submit ();
}
}
-->
</SCRIPT>