[英]How to call a html page and make it as pop up window in JavaScript?
如何使用純/本地JavaScript將html頁面作為彈出窗口調用? 抱歉,我的Java語言不太好。 請幫我。 謝謝
如何將給定腳本添加到腳本中?
這是我的腳本:
function scanLapVerification() {
msgbox("sendRequest: scanLapVerification");
chrome.tabs.sendRequest(tabLapVerification, { method: "scanLapVerification" },
function (response) {
msgbox("receiveResponse: scanLapVerification " + jsonToString(response, "JSON"));
// maintaining state in the background
if (response.data.content == "address_check") {
//open google maps with request for contact address
var gmaps;
if (confirm("Do you want to proceed on Google Maps and search for Contact Address?") == true) {
gmaps = tabCreate("http://maps.google.com/maps?q=" + encodeURIComponent(response.data.contact_address));
} else {
gmaps = "You Cancel!";
}
document.getElementById("maps").innerText = gmaps;
}
}
);
}
我已經找到答案了,我只是放了這個小腳本
popupWindow = window.open('/test.htm', 'name', 'width=700,height=350');
popupWindow.focus();
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.