元素“形式”不允许作为元素“table”的子元素在这种背景下。 [英] Element "form" not allowed as child of element "table" in this context.

查看:70
本文介绍了元素“形式”不允许作为元素“table”的子元素在这种背景下。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对网络开发很陌生。

我无法理解,这是什么问题?

给出。



在此上下文中,元素表单不允许作为元素表的子元素。 (抑制此子树的更多错误。)



这是我的代码



I'm very new to web development.
i'm unable to understand , what kind of problem it is?
it is given.

Element "form" not allowed as child of element "table" in this context. (Suppressing further errors from this subtree.)

here is my code

<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <link rel="stylesheet" href="signupstyle.css" type="text/css">
        <link rel="stylesheet" href="DDM.css" type="text/css">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
        <div>
            <header id="header1" >
                <h1>Kids R Kids School</h1>
                <h4>Administrator</h4>
                <h4>Sign Up Page</h4>
            </header>
            <ul>
                <li onclick="window.open('index.html', '_self');" >Home</li>

                <li>Student
                    <ul>
                        <li>Web Design</li>
                        <li>Web Development</li>
                        <li>Illustrations</li>
                    </ul>
                </li>
                <li>Teacher</li>
                <li>Parent</li>
                <li>Contact</li>
                <li>Sign Up
                    <ul>
                        <li>New User</li>
                        <li>Sign In</li>
                        <li>Already Registered</li>
                    </ul>
                </li>
            </ul>
            <div id="MyMenu1"></div>
            <div id="body" >
                <table>
                    <form class="form-container" >
                        <div class="form-title"><h2>Sign up</h2></div>
                        <div class="form-title">Name</div>
                        <input class="form-field" type="text" name="firstname" /><br />
                        <div class="form-title">Email</div>
                        <input class="form-field" type="text" name="email" /><br />
                        <div class="submit-container">
                            <input class="submit-button" type="submit" value="Submit" onclick="window.open('signupaction.html', '_self');"/>
                        </div>
                        <input class="submit-button" type="button" value="Submittttt" onclick="window.open('signupaction.html', '_self');" >
                    </form>
                </table>

            </div>
            <footer id="footer1" >
                <button class="button" >Insert</button>
                <button class="button" >Reset</button>
                <button class="button" onclick="window.open('index.html', '_self');" >Admin Home</button>
            </footer>
        </div>
    </body>
</html>

推荐答案

错误消息很明确:您不能将form元素设为table的子元素。它可以是td的孩子。

也许你只需要为表单元素创建类似于表格的对齐方式。有很多方法可以实现这一点,特别是通过CSS。



表也有帮助。您只需要将form元素设为父元素,并将整个表格作为表单的子元素。我认为剩下的应该是清楚的。



-SA
The error message is clear: you cannot make a "form" element a child of "table". It can be a child of "td" though.
Perhaps you just need to create table-like alignment for your form elements. There is a number of ways to achieve that, in particular, via CSS.

Table would help, too. You just need to make form element a parent element, and put the whole table as a child element of form. I think the rest of it should be clear.

—SA


这篇关于元素“形式”不允许作为元素“table”的子元素在这种背景下。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆