【问题标题】:Using Page anchors on django在 django 上使用页面锚点
【发布时间】:2011-02-12 10:49:57
【问题描述】:

我想让 AppEngine 呈现一个自动滚动到 html 锚点的 html 页面。我不确定如何以及在哪里放置这种类型的指令。

    template_values = { 
    'foo' : 'foo',
    'bar': 'bar',
    'anchor' : '#MyPageAnchor'  # ?? Something like this...
    }
    path = os.path.join(os.path.dirname(__file__), fileName) 
    self.response.out.write(template.render(path, template_values))

这可能吗?我该如何做到这一点?

【问题讨论】:

    标签: google-app-engine django-templates


    【解决方案1】:

    这里没有特定的 App Engine。您只需将用户重定向到包含锚点的 URL(例如,http://example.com/foo#anchor)。

    【讨论】:

      猜你喜欢
      • 2023-03-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-05-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-12-25
      相关资源
      最近更新 更多