标签:val var 设置 url ble 重置 lua resize tab
1:在主窗口打开浮动窗口
function openContent() {
appcan.window.openPopover({
name: ‘content‘,
dataType: 0,
url: "root" +
"_content.html",
top: 0,
left: 0
});
}
2:重置窗口大小
appcan.frame.resize(id,left,top,name) //设置指定的浮动窗口恢复到指定窗口的大小,并设置浮动窗口的位置
appcan.frame.resizePopoverByEle(id,left,top,name) //设置指定的浮动窗口恢复到指定窗口的大小,并设置浮动窗口的位置
window.onorientationchange = window.onresize = function () {
for (var i = 0; i < 3; i++) {
if (conArray[i].isOpen) {
appcan.frame.resize(‘content‘, 0, titHeight, ‘content_‘ + conArray[i].name);
}
}
};
appcan.frame.open("content", "table_content" + idx + ".html", 0, titHeight, "content_" + idx);这个设置了窗口的别名
3:把指定窗口弹道所有窗口最上面
appcan.frame.bringToFront(‘content_‘ + idx);
appcan.bringPopoverToFront(‘content_‘ + conArray[idx].name);
4:在指定的浮动窗口执行指定的代码
appcan.frame.evaluateScript(name,popName,scriptContent) //在指定的浮动窗口内执行响应的脚本
5:浮动窗口的切换(可以设置手势)
appcan.frame.openMulti(popName,content,dataType,left,top,width,height,fontSize,flag,indexSelected) //浮动窗口中页面切换
6:/*进度提示框*/ appcan.window.openToast("正在校验中,请稍后", 2000, 5);
标签:val var 设置 url ble 重置 lua resize tab
原文地址:http://www.cnblogs.com/dragonh/p/6423905.html