我想在一个页面上弹出(popup)一个窗口,同时向那个窗口传递一个参数。我用JavaScript 和 PHP 做的。但是PHP 似乎不接受参数num,原码如下。请问哪里错了?有没有更好的办法?
多谢!!!!!!!!!
<html>
<head>
<script type="text/javascript">
function openWindow(num)
{
<? $_SESSION['bbbb'] =num; ?>;
window.open("test.php","","toolbar=no,location=center,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=400,height=340");
}
</script>
</head>
<body > <A HREF=javascript: onClick=openWindow(1);> Connection 1</a><p>
<A HREF=javascript: onClick=openWindow(2);> Connection 2</a>
</body>
</html>
多谢!!!!!!!!!
<html>
<head>
<script type="text/javascript">
function openWindow(num)
{
<? $_SESSION['bbbb'] =num; ?>;
window.open("test.php","","toolbar=no,location=center,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=400,height=340");
}
</script>
</head>
<body > <A HREF=javascript: onClick=openWindow(1);> Connection 1</a><p>
<A HREF=javascript: onClick=openWindow(2);> Connection 2</a>
</body>
</html>