# 我能在 head\_tag 中显示模态框吗？

**URL:** <https://meta.discourse.org/t/can-i-show-a-modal-from-head-tag/289836>\
**Category:** Development\
**Created:** [2023 年9 月 11 日 08:03 UTC](https://meta.discourse.org/t/can-i-show-a-modal-from-head-tag/289836 "2023-09-11T08:03:48Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

作者： ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
发布日期： [2023 年12 月 27 日 06:12 UTC](https://meta.discourse.org/t/can-i-show-a-modal-from-head-tag/289836/2 "2023-12-27T06:12:57Z")

</div>

技术上讲，你可以通过大量的 hack 来实现，但不推荐这样做。

相反，你应该使用插件 API 进行扩展，然后从该代码中触发模态框。你能详细解释一下你正在尝试做什么吗？你是否已经解决了这个问题？

---

_[View the full topic](https://meta.discourse.org/t/can-i-show-a-modal-from-head-tag/289836)._
