apicloud跳转页面

在apicloud中,从test1.html跳转到test2.html的方式,主要用到openWin()函数,具体参见apicloud文档,连接如下

http://docs.apicloud.com/Client-API/api#33


直接上代码:


test1.html的代码

当前是test2.html<br/>
<a href='javascript:void(0)' onclick="goTest2()">点击打开test2.html</a>


test1.html的js代码

function goTest2(){
        api.openWin({
            name: 'test2',
            url: './test2.html',
            pageParam: {
                name: '哈哈'//传递参数
            }
        });
    }

------------------------------------------------------------

test2.html的代码

当前是test2.html



test1.html的js代码

apiready = function(){
        alert(api.pageParam.name);//获取test1.html中传递来的参数
    };



原文出处:/show_1C71514508x5.html