Ajax Jquery 实现
function _submit()
{
var pic=document.getElementById("picfile").value;
$.ajax({
type: "POST",
dataType: "text",
url: "<%=request.getContextPath() %>/txl/global.do?m=checkAttach",
data: "&pic="+pic,
success: function(msg){
if(msg=="success")
{
document.forms[0].action='<%=request.getContextPath() %>/txl/global.do?m=update&deptId=<%=deptId%>&ryid=<%=ryid%>';
document.forms[0].submit();
return true;
}else
{
alert(msg);
}
}
});
}