有沒有辦法在 PHP 應用程序中使用 Toastr Alerts?我想使用 Toastr 通知顯示成功和錯誤消息。是否有任何可用于 php 的庫?javascript<script type='text/javascript'> toastr.info('User Registered..!');</script>如何僅使用 php 存檔此表單?
1 回答

MM們
TA貢獻1886條經驗 獲得超2個贊
首先,您必須在標題中添加 Toastr CSS、JS 和 jquery。
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/2.0.1/css/toastr.css" rel="stylesheet"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/2.0.1/js/toastr.js"></script>
然后,您可以隨時隨地使用 Toastr 警報。您可以將以下方法用于 PHP 應用程序。
echo '<script type="text/javascript">toastr.success('Have Fun')</script>';
更多信息:https : //github.com/CodeSeven/toastr
- 1 回答
- 0 關注
- 205 瀏覽
添加回答
舉報
0/150
提交
取消