gpt4 book ai didi

javascript - 在引导模式中显示输入的问题

转载 作者:行者123 更新时间:2023-11-28 17:04:32 25 4
gpt4 key购买 nike

当我单击一个图标时,我想显示一个引导模式,要求输入一些文本和日期。我已经从 W3Schools 复制了代码并进行编辑以显示我需要的表单,但是当我单击按钮时,它显示标签、文本区域,但不显示输入日期。当我看到显示导航器的代码时,我可以看到输入具有样式。具体来说,它有display: none ,但我不知道是什么使输入具有这种风格。我正在使用 bootstrap,因此显示模式的函数是 bootstrap 原生的。

我尝试将 <input type='date'><label>但它不起作用。

<div class="modal fade" id="modalHitos" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Nuevo hito</h4>
</div>
<div class="modal-body">
<div class="form-group">
<label for="newHito">Hito</label>
<textarea class="form-control" rows="5" id="newHito"></textarea><br>
<label for="newDate">Fecha prevista</label>
<label><input type="date" id="newDate"></label>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal" onclick="saveHito()">Guardar</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
</div>
</div>
</div>
</div>

我希望当我单击按钮时,它会显示带有两个标签和两个输入(文本区域和输入日期)的模式。但它不显示输入日期。

Image of the modal

Image of DevTools in Edge

最佳答案

我不确定,但我认为你的CSS(插件)有问题。检查输入时如果显示:无。您可以使用上面的代码来覆盖输入日期的样式显示属性。

<input type="date" id="newDate" style="display: inline !important;"> 

关于javascript - 在引导模式中显示输入的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56234144/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com