簡體   English   中英

彈出窗口不顯示

[英]Pop-up doesn't show

您能告訴我代碼有什么問題嗎?

<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>";

嘗試刪除一個引號:

由此:

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>";

希望它能工作。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM