110,538
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="http://jquery.malsup.com/jquery-1.3.2.js"></script>
<script type="text/javascript" src="http://jquery.malsup.com/form/jquery.form.js"></script>
<script>
jQuery(document).ready(function() {
$('#frmUpload').ajaxForm({
url: 'return.aspx',
type: 'post',
dataType: 'json',
success: function(data) {
alert(1)
alert(data)
return false;
}
});
});
</script>
</head>
<body>
<form id="frmUpload" name="frmUpload" enctype="multipart/form-data" method="post" action="return.aspx">
<input type="file" id="upload" name="upload" size="50" />
<input id="upload" name="upload" type="submit" value="upload" title="upload" />
</form>
</body>
</html>
<%
HttpContext.Current.Response.ContentType = "text/plain";
HttpContext.Current.Response.Charset = "utf-8";
Response.Write("{error: false, message: 'no files !'}");
%>