我正在使用cakephp框架。我试图发送电子邮件,其中我想要一个链接,这将打开一个新的弹出窗口。但是,当我尝试点击网址时,它显示网址为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>
答案 0 :(得分: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>