从复合材料而不是键打印选择元素的文本

发布于 2025-01-30 06:06:51 字数 381 浏览 1 评论 0原文

我正在尝试迭代并打印用户选择的选择元素的文本。复合材料的关键是项目

{% for item in data.item %}
    <tr>
        <td style="text-align: center;">{{ item.qty }} </td>
        <td style="text-align: center;">{{ item.book }}</td>
    </tr>
{% endfor %}

我知道 item.book 只会打印钥匙。那么,我将如何更改它以打印文本呢?

I am trying to iterate and print the text of the select element selected by the user. The key of the composite is item.

{% for item in data.item %}
    <tr>
        <td style="text-align: center;">{{ item.qty }} </td>
        <td style="text-align: center;">{{ item.book }}</td>
    </tr>
{% endfor %}

I know that item.book would only print the key. So how would I change it to print the text?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文