制作弹出窗口的代码片段:
<script>
function about() {
window.open( "/aboutserver.html", "_blank",
"location=no, titlebar=no, status = no, height = 650, width = 300, resizable = no, location=no, menubar=no, scrollbars=no, toolbar=no");
}
</script>
<a href="#" onClick="about()">Server Info</a> <br>
这是实际弹出窗口的代码:
<div align="center"><html><body><h1>Info</h1></div>
<br>Provides:<br><br><br>
blah blah etc
<script>
function close(){
window.self.close();
}
</script>
<button onClick=close()>Close</button>
我也试过 window.close(); 和 window.close('aboutserver.html')