【问题标题】:Hexo : How to read query param of the URL in ejs by using hexo framework helpers?Hexo:如何使用 hexo 框架助手读取 ejs 中 URL 的查询参数?
【发布时间】:2018-02-27 10:12:58
【问题描述】:
  • 将返回域名。
  • 将返回域名后剩余的 URL 但不返回查询参数?

谁能帮我阅读查询参数?

例如:http://localhost:4000/create.html?step=1

【问题讨论】:

    标签: node.js ejs hexo


    【解决方案1】:

    Hexo 助手将在构建时执行,因此他们无法知道客户端的查询参数。

    根据您的需要,您必须在客户端使用 JavaScript:window.location.search 将为您提供 ?step=1

    【讨论】:

      猜你喜欢
      • 2016-02-17
      • 2016-02-23
      • 2017-11-20
      • 2014-08-17
      • 2017-03-31
      • 1970-01-01
      • 1970-01-01
      • 2023-03-19
      • 1970-01-01
      相关资源
      最近更新 更多