在 playframework2.6.3 中不工作数据表
doesn't work dataTables in playframework2.6.3
我使用 playframework2.6.3 并想使用数据表(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>
我的依赖项不起作用。为什么?
已更改
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 *;"
我使用 playframework2.6.3 并想使用数据表(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>
我的依赖项不起作用。为什么?
已更改
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 *;"