<!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=utf8" />
<title>demo</title>
</head> <body>
<script type="text/javascript" src="http://files.cnblogs.com/tinyphp/jquery-1.3.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function()
{
$('form').submit(function(event)
{
event.preventDefault();
var t=$(this).serialize();
$.get('a.php',t,function(data)
{
console.log(data);
})
})
}) </script>
<form action="" method="post">
名字:<input type="text" value="tom" name="name"/>
<input type="text" name="age" value="10"/>
<span id="a">提示</span>
<input type="submit" value="tijiao" name="submit"/>
</form>
</body>
</html>

a.php打印下$_GET得到:

Array
(
[name] => tom
[age] => 10
)
$(this).serialize()  相当于  name=tom&age=10

相关文章:
http://www.w3school.com.cn/jquery/ajax_serialize.asp

最新文章

  1. 监视EntityFramework中的sql流转你需要知道的三种方式Log,SqlServerProfile, EFProfile
  2. 数据库 Linux下的MySQL数据库管理
  3. Java 文件和byte数组转换
  4. javascript解析引擎(每天有学习一点篇)
  5. Java基础集锦——利用Collections.sort方法对list排序
  6. 零成本实现WEB性能测试(一)性能测试基础
  7. Android 工程目录结构简介
  8. IOPS=(Queue Depth)/(IO latency)
  9. VMWare 11安装操作系统 - 初学者系列 - 学习者系列文章
  10. python在接口测试的实际应用
  11. 微信支付接口开发之---微信支付之JSSDK(公众号支付)步骤
  12. WPF简易北京地铁效果图
  13. 一个非常简单的IMPDP事儿
  14. Java开发笔记(十一)常见的数学函数
  15. 【模板】ac自动机
  16. bzoj千题计划316:bzoj3173: [Tjoi2013]最长上升子序列(二分+树状数组)
  17. PAT 1112 Stucked Keyboard
  18. 线程池ThreadPoolExecutor整理
  19. python学习笔记九——序列
  20. ASP.Net MVC 中EF实体的属性取消映射数据库、自定义名称

热门文章

  1. 设置VS2010中自带的ActiveX控件测试容器TstCon
  2. 微软职位内部推荐-Senior Software Engineer
  3. color the python console text
  4. mvc5引用ExtJS6
  5. mui开发
  6. kernel nf_conntrack: table full, dropping packet[转载]
  7. android 自动化压力测试-monkey 2 获取程序包名
  8. 记codevs第一次月赛
  9. 【Python】vim7.4 配置python2.6支持Gundo
  10. JAVA算法系列 快速排序