开发者

Netbeans "application/x-javascript" tags

I am using Netbeans to edit my HTML project. I have defined the project as a PHP project (although it is just HTML).

The problem: Netbeans does not recognize this as Javascript:

<script type="application/javascript">

or

<script type="application/x-javascript">

As such it does not enable Javascript editing features. (Autocomplete and such...)

Instead it only recognizes <script type="text/javascript">.

Is there a c开发者_运维知识库ustom way to cause the editor to recognize "application/javascript" as Javascript?


I believe Netbeans is looking for <script type="text/javascript"> before autocomplete is enabled. They are probably following the W3 HTML specification for inline JavaScript.

The question on which is the correct MIME type for JavaScript comes up often. The official MIME type is application/javascript, but some browsers don't support this. The industry standard has become 'text/javascript'.


Putting the javascript in a separate file from the HTML would solve it, wouldn't it? Or is that not an option?

Found this: http://forums.netbeans.org/topic6181.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜