邮件形式的数据顺序是否与Web表单中的相同? [英] Will data order in post form be the same to it in web form?
本文介绍了邮件形式的数据顺序是否与Web表单中的相同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
假设网络表格中有5个输入
Assuming there are 5 inputs in web form
<input name='the_same[]' value='different' />
<input name='the_same[]' value='different' />
<input name='the_same[]' value='different' />
<input name='the_same[]' value='different' />
<input name='the_same[]' value='different' />
当服务器端收到帖子数据时,我使用foreach接受数据,比如说
When server side receive the post data, i use a foreach to accept data, say
$the_same = new array();
foreach($_POST['the_same'] as $data)
$the_same[] = $data;
服务器端保存的数据顺序是否与Web表单中的顺序相同?和跨浏览器,它可能是所有浏览器遵循的标准。
Will the order of data saved in server side be the same to it in web form? and cross browsers, it could be a criteria all browsers follow.
推荐答案
好吧, HTML表单上的W3C推荐确实说:
控件名称/值在
中列出它们在文档中出现的顺序。
The control names/values are listed in the order they appear in the document.
仍然,我认为让你的应用程序严格依赖于这个细节有点冒险。
Still, I'd consider it a bit risky to have your app depend critically on that detail.
这篇关于邮件形式的数据顺序是否与Web表单中的相同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文