dynamic-popup.js
来自「这是《JavaScript学习源代码》一书的源代码」· JavaScript 代码 · 共 17 行
JS
17 行
// a function to create a dynamic popup window
function popup()
{
// create the popup window
var popwindow = window.open("","","top=40,left=30,width=250,height=120");
// open the popup window HTML document
popwindow.document.open();
// write content in the popup window
popwindow.document.write("<title>Pop-up</title>");
popwindow.document.write("Dynamic Pop-up Page<br/>");
popwindow.document.write("<img src='dex.gif' alt=''>");
// remember to finally close the HTML document
popwindow.document.close();
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?