码迷,mamicode.com
首页 > 其他好文 > 详细

前端小技巧笔记

时间:2017-03-08 12:59:16      阅读:136      评论:0      收藏:0      [点我收藏+]

标签:sub   数据   技巧   color   cli   form   his   submit   query   

  1. jQuery获得表单(form)数据

1 $(function() {
2     $(‘#submit‘).click(function() {
3         var map = {};
4         var table = $(‘form‘).serializeArray();
5         $.each(table, function() {
6             map[this.name] = this.value;
7         });
8     });
9 }

 

前端小技巧笔记

标签:sub   数据   技巧   color   cli   form   his   submit   query   

原文地址:http://www.cnblogs.com/1984s/p/6518411.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!