为什么我的javascript文件没有加载? [英] why would my javascript file not be loading?

查看:81
本文介绍了为什么我的javascript文件没有加载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将JS文件加载到我的网站中,我已将文件放入与加载文件完全相同的文件夹中,但是firebug没有显示它已加载,并且它的效果不可见。

I am trying to load a JS file into my website, I have placed the file into exactly the same folder as one that does load, but firebug does not show that it has loaded, and it's effects are not visible.

为什么会这样?

以下是加载脚本的代码

<script src="<?php bloginfo('template_url'); ?>/page-customs/js/QES_form_edits.js" type="text/javascript"></script>
<script src="<?php bloginfo('template_url'); ?>/page-customs/js/datepicker.js" type="text/javascript" charset="utf-8"></script>

第一个没有被加载,第二个是。

The first is not being loaded, the second is.

这是脚本本身:

jQuery(document).ready(function($) {

$("fieldset#keyword p.instruction").html("Search for a name or description of an activity, venue (e.g. Link Center) 
    or other keywords (e .g. coach)");


});

Jquery加载正常。

Jquery is loading fine.

推荐答案

如果由于失效而无法运行文件,Firebug将不会显示加载的javascript文件。修复JS,解决问题。

Firebug will not show a javascript file as loaded if the file will not run due to invalidation. Fix JS, fix problem.

这篇关于为什么我的javascript文件没有加载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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