<script>
var test={aa:12,bb:34};//或者var test={};
var cc= "acqId"
test[cc]=12;
alert(test.cc)
</script>
使用场景
function objectTest() { var test = { aa: 12, bb: 34 }; var cc = "acqId" test[cc] = 12; $.ajax({ url: xxx/getReslut.htm, type: "GET", data: test, async: true, success: function(result) { alert("success"); } }); }
时间: 2024-10-12 20:12:22