[英]Pop-up doesn't show
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>";
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. 希望它能工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.