appcan常用的視窗方法

來源:互聯網
上載者:User

標籤: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);
 

appcan常用的視窗方法

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.