2015-08-09 109 views
1

至今代碼:sweetAlert沒有顯示出來

<!DOCTYPE html> 
<html> 
    <head> 
     <title>Project 506</title> 
     <script type="text/javascript" src="sweetalert.min.js"></script> 
     <script src="https://ajax.googlesapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> 
     <link rel="stylesheet" href="sweetalert.css" type="text/css" /> 
     <style type="text/css"> 
      body { 
       text-align: center; 
      } 
     </style> 
     <script type="text/javascript"> 
      $(document).ready(function() { 
       $("#first").click(function() { 
        sweetAlert("Oops...", "Something went wrong!", "error"); 
       }); 
      }); 
     </script> 
    </head> 
    <body> 
     <h1>Message Boxes</h1> 
     <input type="button" id="first" value="Just a Notification" /> 
     <input type="button" id="second" value="Successfully Completed!" /> 
     <input type="button" id="third" value="Something Went Wrong!" /> 
    </body> 
</html> 

我不是爲什麼sweetAlert動畫仍然沒有彈出清楚,當我點擊第一個按鈕。我嘗試將<script>的行移動到腳本的不同部分,但它仍然不起作用。那我該如何解決這個問題呢?

回答