}
else{
out.print("<SCRIPT language=''''javascript''''>");
out.print("alert(''''上传文件大小不能超过"+(file_size_max/1000)+"K'''');");
out.print("window.location=''''upfile.jsp;''''");
out.print("</SCRIPT>");
}
}
}catch (Exception e){
e.toString();
}
%>
2 upload.htm
<html>
<head>
<title>请选择上传的图片</title>
</head>
<body>
<table border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="45" align="center" valign="middle"><form action="uploadimage.jsp" method="post" enctype="multipart/form-data" name="form1">
请选择上传的图片
<input type="file" name="file">
<input type="submit" name="Submit" value="上传">
</form></td>
</tr>
</table>
</body>
</html>