html - HTML 表单只读错误
问题描述
我是 HTML 新手。我正在尝试创建一个包含只读纯文本和输入的内联表单。但是,我的输出的某些部分丢失了。预期的 {{i}} 是 ('I', 'body') 输出是 ('I', 任何人都可以提出问题所在吗?谢谢
我的html文件:
<p> Please select the relevant dependency that will add to your output </p>
{% for i in extraction %}
{{i}}
<form class="form-inline">
<div class="form-group mb-2">
<label for="sampledependency" class="sr-only">Dependency</label>
<input type="text" readonly class="form-control-plaintext" id="sampledependency" value={{i}}>
</div>
<div class="form-group mx-sm-3 mb-2">
<label for="inputpolarity" class="sr-only">Polarity</label>
<input type="text" class="form-control" id="inputpolarity" placeholder="Polarity">
</div>
<button type="submit" class="btn btn-primary mb-2">Add</button>
</form>
{% endfor %}
这是从烧瓶渲染的 html_template:
return render_template('annotation.html',
first_sentence = first_sentence,
extraction = [('I', 'body'),('d', 'adasd')])
解决方案
推荐阅读
- c# - 我的 WPF 按钮需要更改不同按钮的内容
- java - 如何使用注释设置测试方法执行的优先级?
- image - 'Welcome to Jekyll' 帖子中缺少 Kitty 图像,但在 index.md 和 about.md 中显示
- java - 我必须创建一个需要使用线程的应用程序,但它们不能正常工作
- android - LottieAnimationView 在 Android 中不显示图像缩放效果
- git - 重新启用 Visual Studio Code GitHub 身份验证
- angular - AngularFire身份验证中的authState和用户有什么区别?
- flutter - Flutter 无法加载带有德语变音符号的资产
- php - 带有 laradock 的 laravel 回声服务器
- python-3.x - 具有多个子域的 Python 允许来源