我有一个包含20个复选框的表单.
我想在选中复选框时显示div的内容.我得到了这样的结果
#toggle-content1 {
display: none;
}
#mycheckbox1:checked~#toggle-content1 {
display: block;
height: 100px;
}
#toggle-content2 {
display: none;
}
#mycheckbox2:checked~#toggle-content2 {
display: block;
height: 100px;
}Run Code Online (Sandbox Code Playgroud)
<input type="checkbox" name="mycheckbox" id="mycheckbox1" value="0" />
<div id="toggle-content1">
This content should appear when the checkbox is checked
</div>
<input type="checkbox" name="mycheckbox" id="mycheckbox2" value="0" />
<div id="toggle-content2">
This content should appear when the checkbox is checked
</div>Run Code Online (Sandbox Code Playgroud)
但是如果你尝试一下代码片段,你会注意到第一个复选框移动第二个(当打开div时),是否有办法将复选框留在一行并显示其他行的div?
css世界对我来说是新的,有一种方法可以编写20个复选框的代码而无需为每个div写css?
我有一个表单,可以在多个字段中上传多个文件
例如:我有一个名为 PR1 的字段,另一个 Pr2 和 PR3,在每个这个字段中,我可以上传(或不上传)多个文件,上传端工作正常:
files = request.files
for prodotti in files:
print(prodotti)
for f in request.files.getlist(prodotti):
if prodotti == 'file_ordine':
os.makedirs(os.path.join(app.instance_path, 'file_ordini'), exist_ok=True)
f.save(os.path.join(app.instance_path, 'file_ordini', secure_filename(f.filename)))
print(f)
Run Code Online (Sandbox Code Playgroud)
所以使用这种方法,结果例如是:
Pr1
<FileStorage: 'FAIL #2.mp3' ('audio/mp3')>
Run Code Online (Sandbox Code Playgroud)
在这一点上,我想用+ 文件扩展名的名称更新我的数据库file中行中的字段,pr1我file怎样才能得到文件的名称?
我在php中创建一个机器人,我需要在键盘上使用一些表情符号.
我使用3位表情符号没问题(就像2b50中型星).
这是发给Telegram的网址
https://api.telegram.org/bot/sendMessage?chat_id =&text = Ciao + Andrea!&reply_markup = {%22keyboard%22%3A [[%22\u2b50 + TEST%22%2C%22 \%2FTEST + 0 %22]%2C [%22 \%2FTest2%22%2C%22test3%22]%2C%22resize_keyboard%22%3Atrue%2C%22one_time_keyboard%22%3Atrue}
我怎样才能使用4bit表情符号?
我有这个数组数组:
[['Frutta',
['M01', '2018-08-06 08:35:00', '2018-08-06 10:13:00'], ['M02',
'2018-08-06 10:18:00', '2018-08-06 11:42:00'], ['M04', '2018-08-06 15:19:00',
'2018-08-06 16:37:00']],
['verdura',
['M01', '2018-08-06 08:35:00', '2018-08-06 10:25:00']]]
Run Code Online (Sandbox Code Playgroud)
我想打印每个字段
所以,用烧瓶我尝试这样:
{% for prodotto in range(inserisci_ordine[1]| length) %}
{{ inserisci_ordine[prodotto][0] }}<br>
{% for macchine in range(inserisci_ordine[prodotto]| length) %}
{{ inserisci_ordine[prodotto][macchine] }}<br>
{{ inserisci_ordine[prodotto][macchine][2] }}<br>
{% endfor %}
{% endfor %}
Run Code Online (Sandbox Code Playgroud)
我想打印这样的东西:
frutta
M01, 2018-08-06 08:35:00, 2018-08-06 10:13:00M02, 2018-08-06 10:18:00, 2018-08-06 11:42:00M04, 2018-08-06 15:19:00, 2018-08-06 16:37:00verdura
M01, 2018-08-06 08:35:00, 2018-08-06 10:25:00但我无法弄清楚..
编辑。
是否有可能以某种方式打印上一个周期中使用的机器?例如: …