简体   繁体   English

验证 html 不允许输入

[英]validation html not allowed INPUT

I can't fix these errors.我无法修复这些错误。 They are all related:它们都是相关的:

Line 110, Column 36: document type does not allow element "INPUT" here;第 110 行,第 36 列:文档类型不允许在此处使用元素“INPUT”; missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV", "ADDRESS" start-tag缺少“P”、“H1”、“H2”、“H3”、“H4”、“H5”、“H6”、“PRE”、“DIV”、“ADDRESS”起始标签之一

<input name="query" type="text"> 

Line 111, Column 66: document type does not allow element "INPUT" here;第 111 行,第 66 列:文档类型不允许在此处使用元素“INPUT”; missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV", "ADDRESS" start-tag缺少“P”、“H1”、“H2”、“H3”、“H4”、“H5”、“H6”、“PRE”、“DIV”、“ADDRESS”起始标签之一

<input type="submit" name="submit" id="submit" value="Search"> 

Line 112, Column 8: end tag for "FORM" which is not finished第 112 行,第 8 列:未完成的“FORM”的结束标记

/form> /形式>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> 
<html> 
<head> 
    <title>Griffith Dating Connection</title> 
    
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
    <link rel="stylesheet" type="text/css"href="style.css"> 
</head> 
 
<body> 
<div id="container"> 
<div id="header"> 
  <div class="title"><a href="#">The Griffith Dating Connection</a></div> 
  <div class="subtitle">find your &quot;study buddy&quot;</div> 
  <div class="intro-part1">Where Griffith singles meet.</div> 
  <div class="intro-part2"></div></div> 
<div id="nav"> 
 
<div id="nav-in-top"> 
 
</div> 
 
<div id="nav-in-middle"> 
<p class="title2">Navigation</p><br> 
 
<span> 
<a class="menu" href="index.html">Home</a> 
<a class="menu" href="allusers.php">View All Users</a> 
<a class="menu" href="doc.html">Documentation</a> 
</span> 
<p>&nbsp;</p> 
<div class="form">   
<h3>User Login</h3> 
            <div class="loginbox"> 
    <form action="processlogin.php" method="post"> 
                        
        <table border="0" cellspacing="0" cellpadding="5"> 
            <tr> 
                <td>Username</td> 
                
            </tr> 
            <tr> 
                <td><input type="text" name="UserName" /></td> 
                
            </tr> 
            <tr> 
                <td>Password</td> 
                
            </tr> 
            <tr> 
                <td><input type="text" name="Password" /></td> 
                
            </tr> 
            <tr> 
                <td><input type="submit" value="Login" /></td> 
                
            </tr>            
        </table> 
      
    </form> 
</div>    <p>New User Register <a href="create.php">here</a>.</p> 
 
       <div class="reg"> 
   </div></div> 
<p class="title2">Our 5 newest members</p><br> 
        <div class="menu2">Username|Age|Gender</div>   
                   
<div class="menu2"> <a href="profile.php?profile=19">newer</a> 
                41
                Male
        </div> 
                   
<div class="menu2"> <a href="profile.php?profile=18">newer</a> 
                41
                Male
        </div> 
                   
<div class="menu2"> <a href="profile.php?profile=17">newer</a> 
                41
                Male
        </div> 
                   
<div class="menu2"> <a href="profile.php?profile=16">newer</a> 
                41
                Male
        </div> 
                   
<div class="menu2"> <a href="profile.php?profile=15">newer</a> 
                41
                Male
        </div> 
            </div> 
</div> 
<div id="nav-in-bottom"></div> 
<div id="content"> 
<p class="title2"><b>Dating</b></p> 
<br> 
    <blockquote> 
<p>This is the griffith dating connection. Here students may come and find their one true &quot;study buddy&quot;. We hope this website is easy to use as well as effective in finding your &quot;study buddy&quot;. Remember to always have &quot;study protection&quot; and that people may not be who they say they are. Always update your &quot;anti-virus protection&quot; when &quot;studing&quot;.</p> 
    </blockquote> 
<br> 
<div id="box"> 
 
<div class="content_left"> 
<h3>Search</h3> 
<div class="form"> 
 
    <form name="form1" method="get" action="results.php"> 
        <input name="query" type="text"> 
        <input type="submit" name="submit" id="submit" value="Search"> 
    </form> 
 
</div> 
</div> 
 
<div class="content_right"> 
 
<h3>Lorem Ipsum</h3> 
 
 <img src="images/img2.jpg" class="floatTL" alt="#" /> 
 
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut 
laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation 
ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor 
in hendrerit in vulputate velit esse molestie consequat.</p> 
</div> 
 
</div> 
</div> 
<div id="footer"> Josip Zirdum Griffith Student Number &quot;s2794971&quot; </div> 
</div> 
</body> 
</html>

In the DTD you are using, <input> elements cannot be children of <form> elements.在您使用的 DTD 中, <input>元素不能是<form>元素的子元素。 You need to have a block container (such as a <div> or a <fieldset> ) between the <form> and the <input> .您需要在<form><input>之间有一个块容器(例如<div><fieldset> )。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM