尝试将你的对象放到HTC中封装.方法就可以用了.你传递时只传递数组.

解决方案 »

  1.   

    是啊 搞lotus快三年啦
    HTC中封装 我还没用过 先研究先,不知还有什么好方法可以实现呢
      

  2.   

    还有人有好的介绍没,能给我几个好的例子,或者电子书等等都行(HTC的)
    小弟我没找到啊
      

  3.   

    以下为test.html的源代码<html>
    <head>
    <script>
    function test()
    {
        oMainObj=new Object();
        //oObj.cus为自定义属性
        oMainObj.cus='aaaaaaaaaaaaaaaa';
        alert( oMainObj.cus );
        sReturn=window.showModalDialog("test1.html", oMainObj )
        if ( sReturn=='ok' )
        {
         alert( oMainObj.cus );
        }
        else
        {
         alert( 'fail!fail!' );
        }
    }
    </script>
    </head>
    <body>
    <input type='button' value='test' onclick='test()'>
    </body>
    </html>以下为test1.html的源代码,test.html和test1.html必须放在同一目录下<html>
    <head>
    <script>
    function change()
    {
        //oObj其实就是主页面中的oMainObj,js中对象的传递都是引用传递
        oObj=window.dialogArguments;
        oObj.cus='change!change!change!';
        window.returnValue='ok'; 
        window.close();
    }
    </script>
    </head>
    <body>
    <input type='button' value='change' onclick='change()'>
    </body>
    </html>你可以在出现对话框后点击按钮看看效果。或直接关闭不点击按钮看看是不是和点击后有所不同!