The code below comes from jQuery UI Autocomplete:(下面的代码来自jQuery UI Autocomplete:)
var projects = [
{
value: "jquery",
label: "jQuery",
desc: "the write less, do more, JavaScript library",
icon: "jquery_32x32.png"
},
{
value: "jquery-ui",
label: "jQuery UI",
desc: "the official user interface library for jQuery",
icon: "jqueryui_32x32.png"
},
{
value: "sizzlejs",
label: "Sizzle JS",
desc: "a pure-JavaScript CSS selector engine",
icon: "sizzlejs_32x32.png"
}
];
For example, I want to change the desc value of jquery-ui .(例如,我想更改jquery-ui的desc值 。)
How can I do that?(我怎样才能做到这一点?)
Additionally, is there a faster way to get the data?(另外,是否有更快的方法来获取数据?)
I mean give the object a name to fetch its data, just like the object inside an array?(我的意思是给对象取一个名称以获取其数据,就像数组中的对象一样?) So it would be something like jquery-ui.jquery-ui.desc = ....
(因此,它将类似于jquery-ui.jquery-ui.desc = ....
)
ask by qinHaiXiang translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…