开发者

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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜