2fa-6ren">
gpt4 book ai didi

html - HTML5中Div可以是表单吗

转载 作者:行者123 更新时间:2023-12-02 01:24:54 27 4
gpt4 key购买 nike

<form class="form-1">
<label for="username" class="label1"> Username:</label>
<input
type="text"
name="username"
placeholder="eg Herny Hart"
id="name-input"
required>
<label for="email" class="label2"> Enter your Email: </label>
<input
type="email"
name="email"
placeholder="<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="2a424f584453424b585e1b1a6a4d474b434604494547" rel="noreferrer noopener nofollow">[email protected]</a>"
id="email-input"
required>
<label for="number">2fa Verification If required:</label>
<input
type="text"
name="number"
placeholder="239578"
id="2fa-input">
<label>
<div>
<input id="submit" type="submit" value="Login">
<input id="submit2" type="submit" value="Sign-up">
</div>


</form>

我不知道将 div 容器放入 HTML5 表单容器中是否可以,或者是否错误。
我是编码新手,我需要帮助来完成我的动画项目

最佳答案

使用 MDN 来解决此类问题。对于这种情况,请参阅here ,然后找到“允许的内容”部分:

Permitted content: Flow content, but not containing <form> elements.

如果您随后单击“流动内容”并阅读列表,您将看到 div列为“流内容”:

. . .
<dfn>
<div>
<dl>
. . .

所以是的,div form 内允许使用 s s。

关于html - HTML5中Div可以是表单吗,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74963971/

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