21-2.txt

来自「Javascript语言开发经典教程开发」· 文本 代码 · 共 25 行

TXT
25
字号
// This function requests the UniversalBrowserRead privilege to enable// it to read the array elements of the History object.function openHistoryWindow() {    // Open a new window.    var w = window.open("", "historyWindow",                         "width=500,height=300,menubar,resizable");    var d = w.document;    // Request a privilege.    netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");    // Output the browsing history of this window as links in the new window.    for(var i = 0; i < history.length; i++) {        d.write('<A TARGET="new" HREF="' + history[i] + '">');        d.write(history[i]);        d.writeln('</A>');    }    d.close();    // Return the new window.    return w;    // The privilege is automatically disabled when this function returns.}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?