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='點擊查看主機系統(tǒng)監(jiān)控圖' $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>