当前位置: 首页 > 网络学院 > 客户端脚本教程 > HTML DOM > HTML DOM createPopup() 方法
The createPopup() method is used to create a pop-up window.
createPopup()方法可用来建立pop-up窗口
window.createPopup() |
<html> <head> <script type="text/javascript"> function show_popup() { var p=window.createPopup() var pbody=p.document.body pbody.style.backgroundColor="lime" pbody.style.border="solid black 1px" pbody.innerHTML="This is a pop-up! Click outside to close." p.show(150,150,200,50,document.body) } </script> </head> <body> <button onclick="show_popup()">Show pop-up!</button> </body> </html> |
Create a pop-up
建立 pop-up