弹出窗口没有显示

时间:2016-06-20 08:23:17

标签: javascript php html

你能告诉我代码的问题是什么吗?

<script type="text/javascript">
    function PopupCenter(pageURL, title,w,h) 
            {
                var left = (screen.width/2)-(w/2);
                var top = (screen.height/2)-(h/2);
                var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
            } 
            </script>
            </head>


echo "<td><a href='#' onclick='PopupCenter('viewitem.php?Rid=".$row['refnumber']."','myPop1',1000,800)'>  View</a></td>";

1 个答案:

答案 0 :(得分:1)

尝试删除一个引用:

由此:

echo "<td><a href='#' onclick='PopupCenter('viewitem.php?Rid=".$row['refnumber']."','myPop1',1000,800)'>  View</a></td>";

对此:

echo "<td><a href='#' onclick=PopupCenter('viewitem.php?Rid=".$row['refnumber']."','myPop1',1000,800)>  View</a></td>";

希望它有效。