【发布时间】:2014-01-28 15:12:34
【问题描述】:
我收到以下验证错误
Bad value for attribute action on element form: Must be non-empty.
<form method="post" action="" id="form1">
下面是我的 HTML 架构。我使用的是visual studio 2010,之前我没有像使用严格html类型的html 4那样出现这种错误......
这一次我使用的是 HTML5 类型的模板,但即使我尝试添加 action="" 它仍然会产生这个错误。我正在寻找解决方案,但到目前为止我无法找到任何解决方法我做错了什么......
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="SiteMasterPage.master.cs" Inherits="SiteMasterPage" %>
<!DOCTYPE html >
<html lang="en-US">
<head id="Head1" runat="server">
<title></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
</head>
<body>
<form id="form1" runat="server">
....
....
....
</body>
</html>
更新:http://validator.w3.org 上出现 HTML 验证错误
【问题讨论】: