我有以下代码:
我有一组变量需要用作
显然,这样是行不通的。有没有人有类似的想法?使用jQuery是可以接受的。 谢谢!
pub.call_response = function() {
return {
units: [
{
test_attributes: {
}
}
]
};
};
我有一组变量需要用作
test_attributes
中的键/值,如下所示:var key1 = something;
var key2 = something;
var value1 = something;
var value2 = something;
pub.call_response = function() {
return {
units: [
{
test_attributes: {
key1: value1,
key2: value2
}
}
]
};
};
显然,这样是行不通的。有没有人有类似的想法?使用jQuery是可以接受的。 谢谢!