语法:
function aa()
{
//m、p可以是任意类型的数据 数组 int string datset datatable
var m;
var p;
return {a:m,b:p}
}
function bb()
{
var ref=aa();
alert(ref.a);
alert(ref.b);
}
//经过测试 OK
function getTacheContract()
{
var dt=QLfolw.getTacheContract(tmpid).value;//datatable
var dtLength=QLfolw.getTacheContract(tmpid).value.Rows.length;int
return {a:dt,b:dtLength};
}
//控制菜单
function ControlMenu()
{
var ref=getTacheContract();
alert(ref.a); OK object
alert(ref.a.Rows.length); ok length
alert(ref.b); ok
参考:http://www.cnblogs.com/yzx99/archive/2008/08/05/1260561.html