为什么 Chrome 显示“请填写此字段"?空字段上的工具提示?

2022-01-20 00:00:00 google-chrome popup html

我的客户联系了我,说用户投诉说某些字段现在显示带有消息请填写此字段"的工具提示.我简直不敢相信我所听到的......但是客户端是对的 - 使用最新的 Chrome 版本,某些字段会显示带有此消息的浏览器工具提示,甚至与我的验证器并排显示!

I was contacted by my client saying that users complaint saying that some fields now show a tooltip with a message "Please Fill out This Field". I couldn't believe what I heard... but the client is right - using latest Chrome version some fields show a browser tooltip with this message even side by side with my validators!

有什么问题?我错过了什么?

What's the problem? What am I missing?

谢谢.

我的用户控件生成的HTML如下:

The HTML generated by my user control is as follows:

<input name="tbMontante" type="text" maxlength="8" size="10" tbMontante" class="Montantetextfield" 
    FieldName="Montante" 
    Required="True" 
    AllowDecimalValues="True" 
/>

我的文档类型如下:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

我的浏览器应该使用 HTML 5 来解析它吗?

Should my browser use HTML 5 to parse it?

推荐答案

https://www.w3.org/TR/html5/sec-forms.html#element-attrdef-form-novalidate

您可以在表单中禁用验证.

You can disable the validation in the form.

相关文章