Validation errors with the form tag
Can someone please tell me why this will not validate strict?
<div>
<form method="post" action="/search/keywords" />
<input type="text" id="keyword" name="keyword" />
<input type="image" src="/images/go.gif" alt="Search" />
</div>
The 开发者_如何学运维problem is that I have two <form>
s in my page and when I use the "/" to close the form tag, the browser executes the same action url for both even though they are different urls. When I close the form as the page will send to the proper url but it won't validate. I'm using XHTML 1.0 Strict doctype. Can someone please help?
<div>
<form method="post" action="/search/keywords">
<input type="text" id="keyword" name="keyword" />
<input type="image" src="/images/go.gif" alt="Search" />
</form>
</div>
<div>
<form method="post" action="/search/keywords222">
<input type="text" id="keyword" name="keyword" />
<input type="image" src="/images/go.gif" alt="Search" />
</form>
</div>
精彩评论