【问题标题】:syntax error, unexpected identifier "header", expecting ")" [duplicate]语法错误,意外的标识符“标题”,需要“)”[重复]
【发布时间】:2021-09-15 19:33:09
【问题描述】:

我尝试使用 DataTables 并在刀片中添加一行代码

之前

<!DOCTYPE html>
<html lang="en">
   <head>
      <meta charset="utf-8">
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=yes">
      <meta name="description" content="">
      <meta name="author" content="">
      <title>ChatBot</title>
      <!-- Custom fonts for this template-->
      <link rel="icon" type="image/png" href="images/icons/favicon.ico" />
      <link href="{{ asset('css/fontawesome-free/css/all.min.css') }}" rel="stylesheet" type="text/css">
      <link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">
      <!-- Custom styles for this template-->
      <link href="css/sb-admin-2.min.css" rel="stylesheet">
      <link href="css/customtemplate.css" rel="stylesheet">

      <link rel= "stylesheet" type= "text/css" href= "botwidget/css/materialize.min.css">
      <link rel= "stylesheet" type= "text/css" href= "botwidget/css/style.css">
      <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

      @yield('header')
   </head>

现在我尝试添加一行代码

     <link rel="stylesheet" href="{{ asset('css/dataTables.min.css) }}">

然后出现此错误 这行代码有问题吗?

我也试过加一行js

<script src="{{ asset('js/dataTable.min.js') }}"></script>

这也会导致问题吗?

【问题讨论】:

    标签: javascript css laravel


    【解决方案1】:

    您的 CSS 资产文件路径中缺少简单的结束引号,它应该如下所示。

    <link rel="stylesheet" href="{{ asset('css/dataTables.min.css') }}">
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-07-25
      • 2021-09-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多