2015-06-06 260 views
-1

我有以下代碼:toastr消息框,但沒有文字

<script> 
    $(function() { 
     Command: toastr["success"]("My name is Inigo Montoya. You killed my father. Prepare to die!") 
    }); 
</script> 

盒顯示出來卻是空白的,並在它沒有文字。我該如何解決?我已經嘗試添加以下命令:

toastr.options = { 
     "closeButton": true, 
     "debug": false, 
     "newestOnTop": false, 
     "progressBar": false, 
     "positionClass": "toast-top-center", 
     "preventDuplicates": false, 
     "onclick": null, 
     "showDuration": "300", 
     "hideDuration": "1000", 
     "timeOut": "5000", 
     "extendedTimeOut": "1000", 
     "showEasing": "swing", 
     "hideEasing": "linear", 
     "showMethod": "fadeIn", 
     "hideMethod": "fadeOut" 
    } 

但它所做的只是將盒子居中。我如何讓文字出現?

+1

刪除命令:'部分 – AmmarCSE

+0

謝謝,試過了,但是文本仍然沒有顯示 – Philip7899

+0

你得到了什麼錯誤? – Almis

回答

0

您必須刪除Command:塊。