2017-10-11 7 views
-2

Bitte helfen Sie mir! Warum lädt Bootstrap die Klassen nicht?Warum funktioniert mein Bootstrap nicht?

Hier ist mein Code, der nur eine Tabelle und eine einfache Taste, noch keine Klassen angewendet werden

<!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> 

Weder Bootstrap noch Datentabellen funktioniert. Was fehlt mir hier? Jede Hilfe wird geschätzt!

+7

Ich fürchte, werfen den Computer ist die einzige Wahl, ja. – deceze

Antwort

4

Sie importieren das Skript innerhalb <title> das ist nicht korrekt. In <title> ist nur Text erlaubt, der den Titel Ihrer Seite beschreibt. Platzieren Sie Ihre <script> und <link> über die </head>

2

Alle Ihre enthaltenen Dateien sind in Ihrem <title>. Sie müssen schreiben:

<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> 
Verwandte Themen