我使用playframework2.6.3并想使用dataTables(jquery-2.2.4,DataTables-1.10.15)。但它不起作用。我看到简单的HTML。
<!DOCTYPE>
<html lang="en">
<head>
<title>table</title>
<link rel="shortcut icon" type="image/png" href="@routes.Assets.versioned("images/favicon.png")">
<link rel="stylesheet" media="screen" href="@routes.Assets.versioned("stylesheets/css/jquery.dataTables.min.css")">
<script src="@routes.Assets.versioned("javascripts/jquery-2.2.4.min.js")" type="text/javascript"></script>
<script src="@routes.Assets.versioned("javascripts/jquery.dataTables.min.js")" type="text/javascript"></script>
</head>
<body>
<table id="example" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
<th>Column 4</th>
<th>Column 5</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
<th>Column 4</th>
<th>Column 5</th>
</tr>
</tfoot>
</table>
</body>
我的依赖项不起作用。为什么呢?
答案 0 :(得分:0)
已更改
例如play.filters.headers.contentSecurityPolicy =“default-src'self'”
contentSecurityPolicy =“default-src *; style-src *'unsafe-inline'; script-src *'unsafe-inline''unsafe-eval'; img-src * data:'unsafe-inline'; connect- src *'unsafe-inline'; frame-src *;“