<form enctype="multipart/form-data" method="post" name="formform1" id="formform1"action="" onsubmit="">
<table border="1" cellspacing="0" align="center" bgcolor="#EAEAEA" bordercolor="#EFEFEF" bordercolordark="#ffffff" style="font-size:12px;margin-top: 2px" width=1000px>
<tr height="30px">
<td align="center">
<h5 style="width:1000px;height:20px;text-align:center;margin-top:30px;margin-bottom:25px;">项目区位图上传</h5>
项目图类型:<select name="pictype" id="pictype" style="margin-top:20px;">
<option value="" selected>请选择</option>
<option value="1">域项目图</option>
<option value="2">区域项目图</option>
</select>&nbsp;<input type="file" id="xfile" name="xfile"style="width:450px;margin-top:20px;" onchange="CheckExt(this)">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" name="UploadButton" id="UploadButton" value="上传" onclick="save()"><br>
</td>
</tr>
<tr height="20px"rowspan="1"></tr>
<tr rowspan="3">
<td align="center">
<table border="1" cellspacing="0" align="center" bgcolor="#EAEAEA" bordercolor="#EFEFEF" bordercolordark="#ffffff" style="font-size:12px;margin-top: 2px" width="1000">
<tr algin="center">
<td align="center">类别</td>
<td align="center">操作</td>
</tr>
<list picturelist as list>
<tr>
<td>
${list.TITLE}<input type="hidden" value="${list.SPID}" name="ProjectPic" id="y">
</td>
<td>
<a href="#" onclick="SeePic('${list.PATH}')"><font color="blue">预览</font></a>&nbsp;<a href="#" onclick="deleteProjectPic(${list.SPID})"><font color="blue">删除</font></a>
</td>
</tr>
</list>

</table>
</td>
</tr>

</table>
</form>

2.js

<script>
  function deleteProjectPic(spid){
if(confirm("是否删除该信息?")) //弹出确认对话框
{
deletePic(spid);//点击确定时执行删除操作。
}
}
function deletePic(spid){
var timeOut = 1000*60*5;//5分钟
jQuery.ajax({
mode:"",
async:false,
url:"/Business/NewHouse/DeleteProjectPicAjax.5i5j",
contentType:"application/x-www-form-urlencoded;charset=UTF-8",
data:{SPID:spid},
type:"post",
timeout:timeOut,
success:function(data){
var code="";
var message="";
var xmldoc=jQuery.parseXML(data);
jQuery(xmldoc).find("result").each(function(i)
{
code = jQuery(this).children("code").text();
message = jQuery(this).children("message").text();
});
alert(message);
window.location.href="/Business/NewHouse/NewHouseProjectCheckListView.5i5j";
},
error:function(XMLHttpRequest,textStatus,errorThrown){
if(textStatus == "timeout"){
alert("连接超时");
}
if(typeof ( loading)!="undefined"){
loading.hide();
}
}

});
}

</script>
posted on 2017-05-30 08:58  烟波竹客  阅读(397)  评论(0编辑  收藏  举报