javascript - 单击图像,尝试显示描述
问题描述
我正在做一个小论坛,在这个论坛上我有一些不同的图像。我想看看我是否可以单击图像并简要说明用户单击的图像。我无法看到如何实现这一点,这就是我到目前为止所拥有的:
<a class="desc" href="https://www.horizon-dawn.com/about">
<img id="Horizon" src="https://image.api.playstation.com/vulcan/ap/rnd/202010/0221/vC7trMorHJgbImp8PCQvpI0p.png">
</img>
</a>
这将使图像可点击,然后一旦您单击图像,它总是将我重定向到"This site can't be reached"
错误。在我链接到 HTML 的 JavaScript 文件中,我有这一行,需要修改,但我不知道如何:
app.get("/about", (req, res) => {
res.render("description", {
description: "Horizon Zero Dawn is a 2017 action role-playing game developed by Guerrilla Games and published by Sony Interactive Entertainment. The plot follows Aloy, a young hunter in a world overrun by machines, who sets out to uncover her past. The player can explore the open world to discover locations and take on side quests."
})
});
我正在使用 node.JS 并拥有我安装的 NPM express。
任何帮助将不胜感激。非常感谢
解决方案
推荐阅读
- ruby-on-rails - 宝石安装成功,但现在我不能要求它
- dockerfile - Docker、WSL2 和 vs 代码 - 错误的 git/ssh 路径
- javascript - 收到回复后只刷新一次页面
- python - 如何使用 xgboost 在选择的特征数量较少的情况下获得最高精度?
- r - 原子向量使用哪种打印方法?
- go - 使用 Go 模块导入本地模块时缺少 ziphash 错误
- apache-kafka - KSQL 表是否应该为聚合的每个键显示多行?
- xml - Hugo 网站在使用自定义站点地图时仅在文档错误开始时提供 XML 声明
- python - 使用 Hyperopt 进行逻辑回归时无法腌制模块对象
- python - 如何格式化 Python 的 difflib.HtmlDiff 的输出以使其可读?