如何调用html页面并使其成为JavaScript中的弹出窗口?

如何调用html页面并使其成为JavaScript中的弹出窗口?,javascript,html,popup,popupwindow,Javascript,Html,Popup,Popupwindow,如何使用纯/本地JavaScript将html页面作为弹出窗口调用?对不起,我的Javascript不太好。请帮帮我。多谢各位 如何将您给定的脚本添加到我的脚本中 这是我的剧本: function scanLapVerification() { msgbox("sendRequest: scanLapVerification"); chrome.tabs.sendRequest(tabLapVerification, { method: "scanLapVerification" },

如何使用纯/本地JavaScript将html页面作为弹出窗口调用?对不起,我的Javascript不太好。请帮帮我。多谢各位

如何将您给定的脚本添加到我的脚本中

这是我的剧本:

 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();

请看这里并选择一个您喜欢的弹出窗口-----您可能需要使用IFRAME来显示html页面,但请尝试两种方法,看看效果如何。@Tasos但我需要纯/本机javascript,我不知道如何将jquery转换为本机javascript:(这里是一些使用JQM---@Tasos的示例,这些示例都是jquery,我不知道如何将其转换为原生/纯javascript