html - 带有搜索值的属性类型中的 Eclipse 警告
问题描述
在 Eclipse 中,我怎样才能摆脱不必要的警告,例如:未定义的属性值搜索
<input id="xx" name="xx" type="search" value="" />
这是一个例子
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta charset="UTF-8" />
<title>Insert title here</title>
</head>
<body>
<input name="find" type="search" id="find" value="0" />
</body>
</html>
如果我只是把
<!DOCTYPE html>
警告消失
如果我在复杂文件中进行相同的更改,警告不会消失,并且由于与 html5 不兼容而出现许多其他警告
解决方案
由于在 XHTML<input type="search" ... />
中无效,因此会显示警告。
避免它或更好地使用 HTML5(即使可以通过将Attributes > Undefined 属性值设置为Ignore在Project > Properties: Validation > HTML Syntax中停用此警告)。
推荐阅读
- scikit-learn - 在 knn 中找到最佳参数
- php - 我在设置 laravel 时发生了什么错误
- authentication - JS 中的 Office Web 加载项并使用 SSAL 登录:登录后的interaction_in_progress
- android-studio - (Vscode) 自动将调试器附加到 android 进程以运行 Android Studio 应用程序
- amazon-web-services - 无法使用创建 Greengrass Core 设备
- django - jwt.decode() 得到了一个意外的关键字参数“验证”
- python - 如何匹配两个不同的数据框以显示哪些行匹配以及哪些行存在差异(显示差异)
- python - 从 TFX/setuptools 禁用无用的日志/输出
- javascript - 使用 Prettier VS Code 删除 Vue 文件中的括号包装
- r - 如何在 flexdashboard 中放置对象