function test(){ //利用对象自定义参数名称 var t = {P1:"a",P2:"b"} //返回的数据 var ttt = {a:"111",b:"222"} //得到数据 alert(ttt[t.P1]); } test();