一些初学者eclipse的问题

发布于 2024-09-30 14:22:42 字数 674 浏览 0 评论 0原文

我最近放弃了 Dreamweaver 作为我的 Web 项目的 IDE,目前正在使用 Eclipse。我当前的Web项目是用PHP编写的,但我对Eclipse还不太熟悉。我下载了 Eclipse PDT。其中包含所有 PHP 开发人员插件。当我开始一个项目时,我的第一个问题是否意味着我正在创建根文件夹?我应该选择PHP项目还是静态Web项目?我选择了 PHP 项目,但我只需要知道我没有选择错误的项目。

当我尝试向我的 index.php 文件添加一些 javascript 时,为什么它显示错误(感叹号)?

<script type="text/javascript" src="javascripts/addTools.js"></script>

当我将鼠标悬停在感叹号上时,我得到以下信息:

在这一行找到多重注释: - 元素脚本的starttag -未定义的属性名称(src) -未定义的属性名称(类型) -endtag of element script

据我所知,我已经使用了正确的语法将外部 javascript 添加到 html 中。看起来像一个错误?

我仍然可以运行该网站,但这只是一个烦人的时刻,有人可以帮助我吗?

请求的屏幕转储: 替代文本

I have recently ditch Dreamweaver as my IDE for my web projects and I'm currently using Eclipse. My current web project is written in PHP, but I'm not so familiar with Eclipse yet. I downloaded the Eclipse PDT. which has all the PHP developer plugins. And my first questions when I start a project does it mean I'm creating a root folder? and shall I choose PHP project or static web project? I've choosed the PHP project,but I just need to know that I'm not choosing the wrong one.

And why is it showing an error(an exclamation mark) when I try to add some javascripts to my index.php file?

<script type="text/javascript" src="javascripts/addTools.js"></script>

when I hoover over the exclamation mark I get the following info:

Multipel annotation found at this line:
-starttag of element script
-undefined attribute name (src)
-undefined attribute name (type)
-endtag of element script

As far as I know I have used the correct syntax for adding external javascripts to a html. Seems like a bug?

I can still run the website but it is just an annoying moment, pls help me anyone?

REQUESTED SCREEN DUMP:
alt text

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

请别遗忘我 2024-10-07 14:22:42

静态 Web 项目适用于仅包含 html 页面的 Web 项目。例如,没有使用 php 的动态页面。你选那个好的。
语法似乎是正确的,您能否向我们展示完整的代码,甚至是您的编辑器的屏幕截图?看来编辑者不知道 html dtd。

static web project is for a web project with only html pages. No dynamic pages with php for instance. You choose the good one.
The syntax seems correct, could you show us the full code, or even a screenshot of your editor? It seems the editor is not aware about the html dtd.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文