我有以下html表:
ID | a | b | c
------------------------------
1 | valuea | valueb | valuec
2 | valuea | valueb | valuec
每列都有一个值的输入框(除了id)
<input name = "1_a" value = "valuea" />
<input name = "1_b" value = "valueb" />
<input name = "1_c" value = "valuec" />
<input name = "2_a" value = "valuea" />
<input name = "2_b" value = "valueb" />
<input name = "2_c" value = "valuec" />
我将此提交到一个asp经典页面,该页面将使用sql表中的属性更新每一行。
目前,我需要将名称字符串拆分为1“_”a以获得正确的行(1,2)和属性(a,b,c)... 有没有更好的方法呢?
类似于:
<input name = "2[a]" />
然后在我的asp经典中我会得到一个包含所有帖子数据的数组:
[1] =>
"a" => "valuea"
"b" => "valueb"
"c" => "valuec"
[2] =>
"a" => "valuea"
"b" => "valueb"
"c" => "valuec"