为什么Eclipse会在HTML脚本标签上创建警告? [英] Why does Eclipse creates warning on HTML script tag?

查看:442
本文介绍了为什么Eclipse会在HTML脚本标签上创建警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 <!DOCTYPE html> 
< html>
< head>
< meta http-equiv =Content-Typecontent =text / html; charset = utf-8/>
< title>< / title>
< script type =text / javascriptsrc =scripts / jquery.js>< / script>
< / head>
< body>

警告是在
行找到多个注释:
- 未定义属性名称(src)
- 未定义的属性名称
(类型)。



我看不到问题在哪里! p>

解决方案

这是doc类型。 Eclipse将根据DTD验证DOM。如果未知实体在DTD中没有明确定义,那么Eclipse会引发警告。


I have a warning on the line including the javascript file.

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
        <title></title>
        <script type="text/javascript" src="scripts/jquery.js"></script>
    </head>
    <body>

The warning is "Multiple annotations found at this line: - Undefined attribute name (src). - Undefined attribute name (type)."

I can't see where the problem is!

解决方案

It's the doc type. Eclipse is going to validate the DOM against the DTD. If unknown entities are not clearly defined in the DTD, then Eclipse will raise warnings.

这篇关于为什么Eclipse会在HTML脚本标签上创建警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆