2017-10-11 96 views
-2

請幫幫我!爲什麼bootstrap不加載類?爲什麼我的引導不工作?

這裏是我的代碼這僅僅是一張桌子和一個簡單的按鈕,但沒有類應用

<!DOCTYPE html> 
<html> 
<head> 
    <title> 
     <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.js"></script> 
     <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> 
     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> 
     <script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script> 
    </title> 
</head> 
<body> 

<table class="table" id="table"> 
    <thead> 
     <tr> 
      <th>Order ID</th> 
      <th>TX ID CxPay</th> 
      <th>TX ID IY</th> 
      <th>Amount</th> 
      <th>Class</th> 
      <th>Date</th> 
     </tr> 
    </thead> 
    <tbody> 

     <tr> 
      <td>1asas</td> 
      <td>1asas</td> 
      <td>1asas</td> 
      <td>1asas</td> 
      <td>1asas</td> 
      <td>1asas</td> 
     </tr> 
    </tbody> 
</table> 
<button class="btn btn-success">asasa</button> 
<script> 
    $(document).ready(function() { 
    $('#table').DataTable(); 
}); 
</script> 
</body> 
</html> 

無論是引導還是數據表工作。我在這裏錯過了什麼? 任何幫助表示讚賞!

+7

恐怕扔掉電腦是唯一的選擇,是的。 – deceze

回答

4

您正在導入<title>內的腳本,這是不正確的。在<title>中,只允許文字描述您網頁的標題。將您的<script><link>放在</head>以上

2

所有包含的文件都在您的<title>中。 你必須寫:

<head> 
    <title>My Title</title> 
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.js"></script> 
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> 
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> 
    <script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script> 
</head>