【问题标题】:what is ? in pagination hyper links什么是 ?在分页超链接中
【发布时间】:2020-08-22 13:54:50
【问题描述】:

嗨,我正在阅读一本关于 django 的书,在分页模板中我看到了一个?但我不知道它为什么在那里。我搜索但没有得到答案。

这是模板:

<div class="pagination">
   <span class="step-links">
       {% if page.has_previous %}
           <a href="?page={{ page.previous_page_number }}">Previous</a>
       {% endif %}
   <span class="current">
       Page {{ page.number }} of {{ page.paginator.num_pages }}.
   </span>
   {% if page.has_next %}
       <a href="?page={{ page.next_page_number }}">Next</a>
   {% endif %}
   </span>
</div>

页面地址中的问号是什么???

【问题讨论】:

    标签: html django hyperlink pagination


    【解决方案1】:

    ? 基本上代表 URL 中的查询参数。

    【讨论】:

      【解决方案2】:

      在许多情况下,查询字符串的开头用问号标记,构成查询字符串的各种参数用和号分隔,但也可以使用其他语法。

      domain.com?parameter1=value1&parameter2=value2&parameter3=value3
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2011-02-20
        • 1970-01-01
        • 1970-01-01
        • 2012-05-06
        • 1970-01-01
        • 2020-02-11
        • 2019-08-02
        • 2011-03-29
        相关资源
        最近更新 更多