豆师傅
豆师傅
  • 发布:2015-03-02 15:57
  • 更新:2015-07-07 13:44
  • 阅读:2639

关于窗口嵌套,如何传URL到嵌套窗口中

分类:5+ SDK

官方DEMO中代码如下:
var ws=null,embed=null;
// 扩展API加载完毕,现在可以正常调用扩展API
function plusReady(){
ws=plus.webview.currentWebview();
embed=plus.webview.create("http://weibo.com/dhnetwork","embed",{top:"46px",bottom:"0px"});
ws.append(embed);
embed.addEventListener("loaded",onBrowserLoading,false);
}

其中我如何把里面的网址,从前一页获取到,也就是如何从父页面传值到嵌套页面中。

2015-03-02 15:57 负责人:无 分享
已邀请:
朋也

朋也 - https://tomoya92.github.io

直接openWindow打开嵌套页面,在openWindow里传参数

朋也

朋也 - https://tomoya92.github.io

    function openCarousel(url) {  
        mui.openWindow({  
            id: "webview_embed.html",  
            url: 'webview_embed.html',  
            extras:{  
                url: url  
            }  
        });  
    }
    mui.plusReady(function () {  
            ws = plus.webview.currentWebview();  
            embed = plus.webview.create(ws.url, "embed", {top: "46px", bottom: "0px"});  
            ws.append(embed);  
        });

该问题目前已经被锁定, 无法添加新回复