【问题标题】:data not shown using include tag in html5在 html5 中使用包含标签未显示数据
【发布时间】:2012-05-14 07:11:33
【问题描述】:

我正在使用 html5 并想在 asp 中创建类似于母版页的页面,我创建了 index.html 和 mainpage.html 页面,并且想要在点击索引页面中存在的链接时调用包括 mainpage.html。我在索引页上使用代码:

<!--#include virtual="mainpage.html" -->

但是当我们运行索引页面时它会显示空白页面

谁能帮帮我

【问题讨论】:

标签: html include


【解决方案1】:
  1. 这是一个评论标签。你放在那里的任何东西都不会做任何事情。

  2. 没有 html5 包含标签之类的东西。

【讨论】:

【解决方案2】:

在包含标记文件中,扩展名始终为 .shtml,并在 Web 服务器中启用检查服务器端包含标记。

【讨论】:

    【解决方案3】:

    “没有 html5 包含标签之类的东西”@Fibericon

    但你正在尝试使用ssi include command

    使用这个命令你会很满意,但是你需要一个服务器环境(例如apache)

    【讨论】:

      猜你喜欢
      • 2014-05-16
      • 1970-01-01
      • 2013-08-08
      • 1970-01-01
      • 2017-08-21
      • 2016-03-09
      • 2022-11-24
      • 2011-08-31
      • 1970-01-01
      相关资源
      最近更新 更多