window.open([url], [windowName], [features], [replace])
<html>
<head>
<title>打开一个空白窗口</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
</head>
<body>
<input type="button" onclick="window.open()" value="新建一个窗口">
</body>
</html>
<html>
<head>
<title>打开一个空白窗口</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
</head>
<body>
<input type="button" onclick="window.open('http://www.groad.net')" value="打开曲径通幽">
<br><br>
<a href="http://www.groad.net" target="_blank"> <xmp>使用 <a> 标签打开新窗口</xmp></a> <br><br>
</body>
</html>
<html>
<head>
<title>在命名窗口中打开文档</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
</head>
<body>
<input type="button" onclick="window.open('http://www.groad.net', 'buttonWin')" value="打开曲径通幽">
<input type="button" onclick="window.open('http://www.baidu.com', 'buttonWin')" value="打开百度">
</body>
</html>
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) | Powered by Discuz! X3.2 |