Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/79.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何制作玉石动态表_Html_Pug - Fatal编程技术网

Html 如何制作玉石动态表

Html 如何制作玉石动态表,html,pug,Html,Pug,我刚开始在jade工作,无法发现错误。我知道这将是非常基本的,但空间太烦人了。有人能帮我吗? 我还想问,有没有什么方法可以在不使用任何模板引擎的情况下在html中创建类似的动态表 html head title= title body div(class="container") table(class='table table-striped') thead tr th Description

我刚开始在jade工作,无法发现错误。我知道这将是非常基本的,但空间太烦人了。有人能帮我吗? 我还想问,有没有什么方法可以在不使用任何模板引擎的情况下在html中创建类似的动态表

  html
  head
    title= title
  body
  div(class="container")
   table(class='table table-striped')
     thead
      tr
       th Description
       th Category
       th Budget
       th City
      each item in items
      tr
       td=item.desc
       td=item.category
       td=item.email
       td=item.mobile

我认为这里的错误是由于空格,所以在浏览器中,尽管有表,但只显示这些代码。我将感谢任何类型的帮助:)

帕格是一种可以编译成HTML的模板语言。Web浏览器无法自行解释Pug,它必须在被浏览器加载之前进行编译。有几种不同的构建工具可用于编译Pug,包括和。对于不熟悉构建工具的初学者,我建议使用或使用GUI应用程序开始编译

一旦您启动并运行,并且假设您的
数组格式正确,您的帕格代码应该如下所示:

html
  head
    title= title
  body
    div.container
      table.table.table-striped
        thead
          tr
            th Description
            th Category
            th Budget
            th City
        each item in items
          tr
            td=item.desc
            td=item.category
            td=item.email
            td=item.mobile

Pug是一种可以编译成HTML的模板语言。Web浏览器无法自行解释Pug,它必须在被浏览器加载之前进行编译。有几种不同的构建工具可用于编译Pug,包括和。对于不熟悉构建工具的初学者,我建议使用或使用GUI应用程序开始编译

一旦您启动并运行,并且假设您的
数组格式正确,您的帕格代码应该如下所示:

html
  head
    title= title
  body
    div.container
      table.table.table-striped
        thead
          tr
            th Description
            th Category
            th Budget
            th City
        each item in items
          tr
            td=item.desc
            td=item.category
            td=item.email
            td=item.mobile

您在浏览器中看到了什么?编译时是否有错误?什么是已编译的HTML?问题中帕格代码的缩进是否与您实际使用的缩进相匹配?@sean我看到的是在浏览器中编写的上述代码,而不是在浏览器中看到的表格您看到的是帕格代码?你是在编译还是只是在浏览器中加载帕格?@Sean我不知道我必须以这种方式编译它。正如我提到的,我完全是一个初学者,你在浏览器中看到了什么?编译时是否有错误?什么是已编译的HTML?问题中帕格代码的缩进是否与您实际使用的缩进相匹配?@sean我看到的是在浏览器中编写的上述代码,而不是在浏览器中看到的表格您看到的是帕格代码?你是在编译还是只是在浏览器中加载帕格?@Sean我不知道我必须以这种方式编译它。正如我提到的,我完全是一个初学者