Html 知道是否允许表单下的链接

Html 知道是否允许表单下的链接,html,Html,下面是我想向您展示的代码。是否允许使用带有a和href标记的代码行 <form class="box" action="index.html" method="post"> <h1>Sign Up</h1> <input type="text" name="" placeholder="Username"> <input type="password" name="" placeholder="Password">

下面是我想向您展示的代码。是否允许使用带有a和href标记的代码行

<form class="box" action="index.html" method="post">
    <h1>Sign Up</h1>
    <input type="text" name="" placeholder="Username">
    <input type="password" name="" placeholder="Password">
    <a href="index.html"><input type="submit" name="" value="Sign Up"></a>
 </form>

注册

否。输入元素可能不是锚元素的后代

见:

内容模型:

透明,但不能有交互内容或元素子体

input
元素是交互式内容)



无论如何,构造HTML是没有意义的。单击链接可导航到带有GET请求的新页面。单击“提交”按钮将导航到包含表单提交的新页面。

那么我可以使用什么代码将我发送到,例如“index.html”一旦我点击提交按钮?@SkyPamposAngeles-您可以将表单的操作设置为
index.html
…您已经完成了…或者在表单处理提交的数据后,使用
位置
响应头将表单提交的任何服务器端代码重定向到
index.html