日期:2014-05-16 浏览次数:20399 次
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript">
<!--
function imgCheck(form){
var fileInput = form["myFile"];
if(fileInput.value==""){
alert("请选择上传文件");
return false;
}else{
return true;
}
}
//-->
</script>
<form method="post" enctype="multipart/form-data"
action="DuploadAction.action" onsubmit="return imgCheck(this)">
<input type="file" size="20" name="myFile"></input>
<input type="submit" value="替换图片1"></input>
</form>
<form method="post" enctype="multipart/form-data"
action="DuploadAction.action" onsubmit="return imgCheck(this)">
<input type="file" size="20" name="myFile"></input>
<input type="submit" value="替换图片2"></input>
</form>
<form method="post" enctype="multipart/form-data"
action="DuploadAction.action" onsubmit="return imgCheck(this)">
<input type="file" size="20" name="myFile"></input>
<input type="submit" value="替换图片3"></input>
</form>