Chrome扩展程序:将popup.html刷新到新的html页面

Ski*_*zit 9 html javascript google-chrome-extension

我正在开发一个chrome扩展,我的popup.html是一个登录页面.我想知道..我如何(成功登录时)重定向到一个新的html页面(在哪个区域加载popup.html?)例如当用户点击扩展图标时,popup.html框中会出现,成功登录后框更改为除了以外的新html页面popup.html.

我该怎么做?

ser*_*erg 16

要在弹出窗口关闭时永久更改它:

chrome.browserAction.setPopup({popup: "new.html"});
Run Code Online (Sandbox Code Playgroud)

如果要在弹出窗口仍处于打开状态时临时更改它:

window.location.href="new.html";
Run Code Online (Sandbox Code Playgroud)