<html>
<head>
<title>Upload Image</title>
<meta httpequiv=ContentType content=text/html; charset=gb>
</head>
<body bgcolor=#FFFFFF text=#>
<form name=IUpload action=upfileasp method=post>
<p><input type=file name=picsrc size= onchange=picshowsrc=documentIUploadpicsrcvalue>
<input type=button value=上载 onclick=detect()></p></form>
<p><img name=picshow src=_//jpg title=图像预览></p>
</body>
</html>
<SCRIPT LANGUAGE=JavaScript>
<!
function imgExceedSize(wh){
if(!documentIUploadpicsrcvalue==){
if(picshowwidth>w||picshowheight>h){
alert(图像尺寸+picshowwidth+X+picshowheight+\\图像尺寸过大!你只能上传尺寸为 +w+×+h+的图像请重新浏览图片!);
return true;
}else{
return false;
}
}else{
return true;
}
}
function detect(){
var ok=imgExceedSize();
if(ok){
documentIUploadreset();
}else{
documentIUploadsubmit();
}
}
//>
</SCRIPT>