欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

jquery怎么遍历表单的数据成一个数组

程序员文章站 2024-02-08 22:02:16
...
jquery如何遍历表单的数据成一个数组
本帖最后由 wulinag 于 2014-08-10 17:11:21 编辑


jquery如何遍历以下表单的数据成一个数组:
以下是我想得到的数组,用php打印出来的结果
Array
(
[conf] => Array
(
[title] => Array
(
[11407482948] => 111
[31407483086] => 222
[21407483086] => 333
[11407483086] => 444
)

[url] => Array
(
[11407482948] => aaa
[31407483086] => bbb
[21407483086] => ccc
[11407483086] => ddd
)

[order] => Array
(
[11407482948] => 1
[31407483086] => 2
[21407483086] => 3
[11407483086] => 4
)
)
)
------解决方案--------------------
if($_POST) {
echo '';<br> print_r($_POST);<br> exit;<br>}<br>?&gt;<br><br><br><br><div class="menu"> <br><ul> <div class="clear"> <a href="/default/index/url?u=aHR0cHM6Ly93d3cucGhwLmNuL2suaHRtbD90PTI=" target="_blank" rel="nofollow"><img onerror="this.src='/statics/superweb999/images/image_error.jpg'"src="/default/index/img?u=aHR0cHM6Ly9pbWcucGhwLmNuL3VwbG9hZC9jb3Vyc2UvMDAwLzAwMC8wNzEvNjIwYzYwNGY3NTI1MTk5NS5wbmc=" style="margin-top: 30px;" alt="jquery怎么遍历表单的数据成一个数组" title="jquery怎么遍历表单的数据成一个数组"></a><p style="float:right;font-size:13px;color:#999;"><span class="red">声明:</span>本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。</p> </div> <p class="article-relative-header">相关文章</p> <p class="article-relative-header">相关视频</p> <hr class="layui-clear"> <ul class="article-relative-ul"> <li> <span class="layui-badge-dots"></span><a class="relevant" href="/default/index/url?u=aHR0cHM6Ly93d3cucGhwLmNuL3BocC13ZWl6aWppYW9jaGVuZy0zMDE5NzcuaHRtbA==" target="_blank" rel="nofollow">关于中英数字混的字串符分割问题_PHP教程</a> </li> <li> <span class="layui-badge-dots"></span><a class="relevant" href="/default/index/url?u=aHR0cHM6Ly93d3cucGhwLmNuL3BocC13ZWl6aWppYW9jaGVuZy0zMDQ2MjcuaHRtbA==" target="_blank" rel="nofollow">应用PHP标签模板实现什么任务_PHP教程</a> </li> <li> <span class="layui-badge-dots"></span><a class="relevant" href="/default/index/url?u=aHR0cHM6Ly93d3cucGhwLmNuL3BocC13ZWl6aWppYW9jaGVuZy0zMTAyNDguaHRtbA==" target="_blank" rel="nofollow">php入门教程 精简版_PHP教程</a> </li> <li> <span class="layui-badge-dots"></span><a class="relevant" href="/default/index/url?u=aHR0cHM6Ly93d3cucGhwLmNuL3BocC13ZWl6aWppYW9jaGVuZy0zMTE0NTcuaHRtbA==" target="_blank" rel="nofollow">require(),include(),requi...</a> </li> <li> <span class="layui-badge-dots"></span><a class="relevant" href="/default/index/url?u=aHR0cHM6Ly93d3cucGhwLmNuL3BocC13ZWl6aWppYW9jaGVuZy0yMDI0OTguaHRtbA==" target="_blank" rel="nofollow">jquery怎么遍历表单的数据成一个数组</a> </li> </ul> <ul class="article-relative-ul"> <li> <span class="layui-badge-dots"></span><a class="relevant" href="/default/index/url?u=aHR0cHM6Ly93d3cucGhwLmNuL2NvZGUvNDk2Lmh0bWw=" target="_blank" title="HTML基础教程之&lt;strong&gt;和&lt;em&gt;" rel="nofollow">HTML基础教程之&lt;strong&gt;和&lt;em&gt;</a> </li> <li> <span class="layui-badge-dots"></span><a class="relevant" href="/default/index/url?u=aHR0cHM6Ly93d3cucGhwLmNuL2NvZGUvNTAwLmh0bWw=" target="_blank" title="HTML基础教程之&lt;span&gt;标签" rel="nofollow">HTML基础教程之&lt;span&gt;标签</a> </li> <li> <span class="layui-badge-dots"></span><a class="relevant" href="/default/index/url?u=aHR0cHM6Ly93d3cucGhwLmNuL2NvZGUvNTI4Lmh0bWw=" target="_blank" title="HTML基础教程之&lt;meta&gt;标签" rel="nofollow">HTML基础教程之&lt;meta&gt;标签</a> </li> <li> <span class="layui-badge-dots"></span><a class="relevant" href="/default/index/url?u=aHR0cHM6Ly93d3cucGhwLmNuL2NvZGUvNjc5Lmh0bWw=" target="_blank" title="HTML &lt;div&gt; 和&lt;span&gt;" rel="nofollow">HTML &lt;div&gt; 和&lt;span&gt;</a> </li> <li> <span class="layui-badge-dots"></span><a class="relevant" href="/default/index/url?u=aHR0cHM6Ly93d3cucGhwLmNuL2NvZGUvODUwLmh0bWw=" target="_blank" title="JavaScript数组对象属性length和二维数组" rel="nofollow">JavaScript数组对象属性length和二维数组</a> </li> </ul> </ul> </div> <div class="comment layui-clear CopyrightData"> <div class="J_Header" id="J_Header"> <p class="header-title">网友评论</p> <p class="header-protocol">文明上网理性发言,请遵守 新闻评论服务协议</p>我要评论</div> <div class="text-box layui-clear article_comment_textarea"> <div class="box-left"> <li><a href="/default/index/url?u=aHR0cHM6Ly93d3cucGhwLmNuamF2YXNjcmlwdDpsb2dpbl90cmlnZ2VyKCk=" target="_blank" rel="nofollow"><img onerror="this.src='/statics/superweb999/images/image_error.jpg'"src="/default/index/img?u=L3N0YXRpYy9pbWFnZXMvdXNlcl9hdmF0YXIuanBn" alt="jquery怎么遍历表单的数据成一个数组" title="jquery怎么遍历表单的数据成一个数组"></a></li> <li><a href="/default/index/url?u=aHR0cHM6Ly93d3cucGhwLmNuamF2YXNjcmlwdDpsb2dpbl90cmlnZ2VyKCk=" target="_blank" rel="nofollow"></a></li> </div> <div class="box-right"> <textarea name="desc" placeholder="请输入内容" class="layui-textarea article_textarea"></textarea><button class="layui-btn article_publish" data-id="202498">立即提交</button> </div> </div> </div> <div class="article-hot layui-clear" style="margin-top:0"> <h2>专题推荐</h2> <ul> <li> <a href="/default/index/url?u=aHR0cHM6Ly93d3cucGhwLmNuL21hcC9kdWd1Lmh0bWw=" target="_blank" rel="nofollow"><img onerror="this.src='/statics/superweb999/images/image_error.jpg'"src="/default/index/img?u=aHR0cHM6Ly9pbWcucGhwLmNuL3VwbG9hZC9hcnRpY2xlLzAwMC8wMDAvMDAzLzVkMWVmMWU5ZTg2NmU2MzUuanBn" alt="jquery怎么遍历表单的数据成一个数组" title="jquery怎么遍历表单的数据成一个数组"></a><a class="course-title" href="/default/index/url?u=aHR0cHM6Ly93d3cucGhwLmNuL21hcC9kdWd1Lmh0bWw=" target="_blank" rel="nofollow">独孤九贱-php全栈开发教程</a><p class="course-type">全栈 <i class="layui-icon layui-icon-user"></i> 170W+</p> <p class="course-des">主讲:Peter-Zhu 轻松幽默、简短易学,非常适合PHP学习入门</p> </li> <li> <a href="/default/index/url?u=aHR0cHM6Ly93d3cucGhwLmNuL21hcC95dW52Lmh0bWw=" target="_blank" rel="nofollow"><img onerror="this.src='/statics/superweb999/images/image_error.jpg'"src="/default/index/img?u=aHR0cHM6Ly9pbWcucGhwLmNuL3VwbG9hZC9hcnRpY2xlLzAwMC8wMDAvMDAzLzVkMWVmMjM2Y2E4Nzg5NDkuanBn" alt="jquery怎么遍历表单的数据成一个数组" title="jquery怎么遍历表单的数据成一个数组"></a><a class="course-title" href="/default/index/url?u=aHR0cHM6Ly93d3cucGhwLmNuL21hcC95dW52Lmh0bWw=" target="_blank" rel="nofollow">玉女心经-web前端开发教程</a><p class="course-type">入门 <i class="layui-icon layui-icon-user"></i> 80W+</p> <p class="course-des">主讲:灭绝师太 由浅入深、明快简洁,非常适合前端学习入门</p> </li> <li> <a href="/default/index/url?u=aHR0cHM6Ly93d3cucGhwLmNuL3RvdXRpYW8tNDA5MjIxLmh0bWw=" target="_blank" rel="nofollow"><img onerror="this.src='/statics/superweb999/images/image_error.jpg'"src="/default/index/img?u=aHR0cHM6Ly9pbWcucGhwLmNuL3VwbG9hZC9hcnRpY2xlLzAwMC8wMDAvMDAzLzVkMWVmMjQ3N2M3ZDc1ODcuanBn" alt="jquery怎么遍历表单的数据成一个数组" title="jquery怎么遍历表单的数据成一个数组"></a><a class="course-title" href="/default/index/url?u=aHR0cHM6Ly93d3cucGhwLmNuL3RvdXRpYW8tNDA5MjIxLmh0bWw=" target="_blank" rel="nofollow">天龙八部-实战开发教程</a><p class="course-type">实战 <i class="layui-icon layui-icon-user"></i> 120W+</p> <p class="course-des">主讲:西门大官人 思路清晰、严谨规范,适合有一定web编程基础学习</p> </li> </ul> </div>
作者信息
jquery怎么遍历表单的数据成一个数组

认证0级讲师

推荐视频教程
  • jquery怎么遍历表单的数据成一个数组javascript初级视频教程
  • jquery怎么遍历表单的数据成一个数组jquery 基础视频教程
  • 视频教程分类