0

我正在使用 cakephp 框架。我正在尝试发送我想要一个链接的电子邮件,该链接将打开一个新的弹出窗口。但是当我尝试点击 url 时,它显示 url 为 nojavascript:newPopup(url); 请帮帮我。

<script type="text/javascript">
// Popup window code
function newPopup(url) {
popupWindow = window.open(url,'popUpWindow','height=600,width=900,left=10,top=10,resizable=yes,
scrollbars=yes,toolbar=no,menubar=no,location=no,directories=no,status=yes');
}
</script>

<a href="javascript:newPopup('<?php echo $this->Html->url(Configure::read('Config.URL'));?>data/CouponOffer/<?php echo $data['CouponCode']['code']; ?>.jpg');">Please print out this coupon to redeem offer.</a>
4

1 回答 1

0

尝试这个 :

<script type="text/javascript">
// Popup window code
function newPopup(url){
popupWindow = window.open(url,'popUpWindow',(height=600,width=800,left=10,top=10,resizable=1,scrollbars=1,toolbar=0,menubar=0,directories=0,status=0));
}
</script>

<a href="javascript:newPopup('<?php echo $this->Html->url(Configure::read('Config.URL'));?>data/CouponOffer/<?php echo $data['CouponCode']['code']; ?>.jpg');">Please print out this coupon to redeem offer.</a>
于 2012-08-17T05:48:48.947 回答