如果满足条件,我试图显示 PNotify 弹出窗口,但似乎没有发生任何事情,这是我的 if 语句:
<?php if($days < 60) { echo "
<script type='text/javascript'>
$(document).ready(function(e) {
notifyUser('success');
});
</script>";?>
<?php if($days < 0) { ?>
<tr style="color: #641E16;">
<td> <?php echo $customer['CardName'];?> </td>
<?php if($days < -2) {?>
<td style="min-width: 90px;">Exprired!</td>
<?php }elseif($days == -1){?>
<td style="min-width: 90px;">Today!</td>
<?php }else{ ?>
<td style="min-width: 90px;"><?php echo $days;?> days</td>
<?php } ?>
</tr>
<?php } ?>
我有这个javascript:
<script type="text/javascript">
function notifyUser(message) {
if(message == "success") {
new PNotify({
title: 'Popup Title',
text: 'Your form as been submitted'
});
}
}
</script>
我错过了什么吗?
任何帮助,将不胜感激。