当我对我正在使用的特定脚本console.log(data)
时,我得到以下
[Object {
name = "videobody", value = "asdasd"
},
Object {
name = "IMUFiles[]", value = "selected_arrow1327549445.png"
},
Object {
name = "filename", value = "testing"
},
Object {
name = "allow_comments", value = "y"
}]
如何从selected_arrow1327549445.png
data
答案 0 :(得分:3)
这是Object
个数组,每个都有name
和value
属性,所以:
data [1].value
编辑:嗯,既然你说订单可以改变,也许只是循环:
for (var i = 0; i < data.length; ++ i)
{
if (data [i].name === "IMUFiles[]")
{
alert (data [i].value);
break;
}
}