<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script language="javascript" type="text/javascript">
<!--
function SimOpen(URL) {
var newwin=window.open(URL,'pop','scrollbars=yes,left=0,top=0,width=400,height=450');
newwin.focus();
}
//-->
</script>
</head><body>
<a href="#" onClick="SimOpen('http://www.cctv.com')">1</a> <a href="#" onClick="SimOpen('http://www.csdn.net')">2</a> <a href="#" onClick="SimOpen('http://www.xiaobin.net')">3</a>
</body>
</html>
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script language="javascript" type="text/javascript">
<!--
function SimOpen(URL) {
var newwin=window.open(URL,'pop','scrollbars=yes,left=0,top=0,width=400,height=450');
newwin.focus();
}
//-->
</script>
</head><body>
<a href="#" onClick="SimOpen('http://www.cctv.com')">1</a> <a href="#" onClick="SimOpen('http://www.csdn.net')">2</a> <a href="#" onClick="SimOpen('http://www.xiaobin.net')">3</a>
</body>
</html>
只是传递参不同,我只想打开一个窗口。
<a href="http://www.csdn.net" target="myNewWindow">2</a>
<a href="http://www.xiaobin.net" target="myNewWindow">3</a>
function openwin(){
window.open ('page.html','newwindow','height=500,width=400,top=0,left=0,toolbar=no,menubar=no,scrollbars=no,resizable=no, location=no,status=no')
}</SCRIPT> <a href="#" onclick="openwin()">打开一个窗口</a>
这样就足够了