弹出窗口没有显示(Pop

编程入门 行业动态 更新时间:2024-10-08 06:21:57
弹出窗口没有显示(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>";

Can you tell me what's the problem with my code?

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

希望它有效。

Try to delete the one quote :

From this:

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

To this:

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

Hope it works.

更多推荐

本文发布于:2023-07-30 13:56:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1338789.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:弹出窗口   Pop

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!