2 回答
TA贡献1802条经验 获得超5个赞
您在HTML中有两个嵌套表单,嵌套的HTML表单是不允许的,正如@Abdulla Nilam和HTML5的工作草案所提到的:
4.10.3 表单元素
内容模型:
流内容,但没有表单元素后代。
要使其工作,您应该删除第一个表单,因为它没有操作或方法:
<link rel="stylesheet" href="../css/feedback/remodal.css">
<link rel="stylesheet" href="../css/feedback/remodal-default-theme.css">
<a class="mainButton" href="#modal">Callback</a>
<div class="remodal" data-remodal-id="modal" role="dialog" aria-labelledby="modal1Title" aria-describedby="modal1Desc">
<div class="remodalBorder">
<button data-remodal-action="close" class="remodal-close" aria-label="Close"></button>
<form id="form" action="../php/feedback/send.php" method="POST">
<p><span class="formlable" style="text-transform: uppercase;">You name</span><br>
<input type="text" class="putName" name="name" cols="67%" placeholder="Required field" required>
<p><span class="formlable" style="text-transform: uppercase;">Phone number</span><br>
<input name="phone" type="tel" class="putPhone" placeholder="Required field" required>
<input type="submit" name="submit" class="btn" value="Order a call">
<input type="hidden" name="formData" value="Application from the site">
<br><br>
By clicking on the "Order a call" button, you give <a class="mainArticlesTextAgree" href="../agreement.html">consent to the processing of</a> your personal data.
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="../js/feedback/remodal.min.js"></script>
<script src="../js/feedback/script.js"></script>
TA贡献1875条经验 获得超5个赞
试试这个HTML表单
<a class="mainButton" href="#modal">Callback</a>
<div class="remodal" data-remodal-id="modal" role="dialog" aria-labelledby="modal1Title" aria-describedby="modal1Desc">
<div class="remodalBorder">
<button data-remodal-action="close" class="remodal-close" aria-label="Close"></button>
<form id="form" action="../php/feedback/send.php" method="POST">
<p><span class="formlable" style="text-transform: uppercase;">You name</span><br>
<input type="text" class="putName" name="name" cols="67%" placeholder="Required field" required>
</p>
<p><span class="formlable" style="text-transform: uppercase;">Phone number</span><br>
<input name="phone" type="tel" class="putPhone" placeholder="Required field" required>
<input type="submit" name="submit" class="btn" value="Order a call">
<input type="hidden" name="formData" value="Application from the site">
</p>
<br><br>
By clicking on the "Order a call" button, you give <a class="mainArticlesTextAgree" href="../agreement.html">consent to the processing of</a> your personal data.
</form>
</div>
</div>
- 2 回答
- 0 关注
- 61 浏览
添加回答
举报