基本信息
源码名称:asp.net 使用jQuery.form插件,实现完美的表单异步提交Demo源码(支持文件上传)
源码大小:0.13M
文件格式:.rar
开发语言:C#
更新时间:2016-03-10
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):78630559
本次赞助数额为: 2 元×
微信扫码支付:2 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="async_submit_test1.aspx.cs" Inherits="jq_form_plug.async_submit_test" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery.ajax异步提交方式</title>
<style type="text/css">
td {
padding: 5px;
}
tr td:first-child {
text-align: right;
}
caption {
font-weight: bolder;
color: red;
}
form {
margin: 20px;
}
</style>
<script src="Script/jquery-1.7.1.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#btnAjaxSubmit").click(function () {
var options = {
url: 'async_submit_test1.aspx?action=SaveUserInfo',
type: 'post',
dataType: 'text',
data: $("#form1").serialize(),
success: function (data) {
if (data.length > 0)
$("#responseText").text(data);
}
};
$.ajax(options);
return false;
});
});
</script>
</head>
<body>
<form id="form1" method="post">
<table border="1">
<caption>jQuery.ajax异步提交方式</caption>
<tr>
<td>用户名:</td>
<td>
<input type="text" name="loginName" /></td>
</tr>
<tr>
<td>性 别:</td>
<td>
<input type="radio" name="sex" value="0" checked="checked" />男
<input type="radio" name="sex" value="1" />女
</td>
</tr>
<tr>
<td>爱 好:</td>
<td>
<input type="checkbox" name="cbLoveYy" value="1" />游泳
<input type="checkbox" name="cbLoveYx" value="1" />游戏
<input type="checkbox" name="cbLovePs" value="1" />爬山
</td>
</tr>
<tr>
<td>所属国家:</td>
<td>
<select name="country">
<option value="请选择" selected="selected">请选择</option>
<option value="中国">中国</option>
<option value="岛国">岛国</option>
</select>
</td>
</tr>
<tr>
<td colspan="2" style="text-align: center">
<input id="btnAjaxSubmit" type="submit" value="jQuery.ajax提交" />
</td>
</tr>
</table>
</form>
<br />
<label id="responseText"></label>
</body>
</html>