1、html超链接打开的窗口大小
<a href="#" onclick="javascript:window.open('http://www.baidu.com','','height=20,width=20,top=0,left=0,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no')">aaaaaaaaaaaaaaa</a>
2、如果在php中,引号多,比较难弄清除,可通过以下方式:
$openNew="onclick=".'"'."javascript:window.open('host_graphics.php?host_id=$host_id&host_address=$host_address','','height=500,width=600,top=300,left=300,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no')".'"';
echo "<td style='vertical-align: middle;text-align: center;'><a href=#?host_id=$host_id&host_address=$host_address name='host_click' style='text-decoration:underline;' title='点击查看主机系统监控图' $openNew> $host_name </a></td>"; //主机名 点击可查看选中主机的具体信息
提示:onclick="javascript:window.open('12.php','','height=500,width=600,top=300,left=300,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no')"
文件后面可以跟上变量的值, 比如
host_graphics.php?host_id=$host_id&host_address=$host_address
如此,则弹出的新窗口 中可以用 GET 获取值。
3、例子:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>ThD</title>
</head>
<body>
</body>
<a href="#" onclick="javascript:window.open('http://www.baidu.com','','height=500,width=600,top=300,left=300,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no')">aaaaaaaaaaaaaaa</a>
</html>