开发者

dom not loading when referencing an external js file

开发者 https://www.devze.com 2023-01-29 02:03 出处:网络
I am refere开发者_如何学运维ncing the jQuery library, in a master page like so: <script type =\"text/javascript\" src =\"../../Scripts/jquery-1.4.1.js\" />

I am refere开发者_如何学运维ncing the jQuery library, in a master page like so:

<script type ="text/javascript" src ="../../Scripts/jquery-1.4.1.js" />

The page loads and I am presented with a blank screen. If I take a look at the source the hmtl code is present, but the browser is simply not displaying any of the elements.

I have tried co-locating the master and the js fail to no avail.

Opening the FF with firebug I get the following error :

Failed to load source for: http://localhost:50417/Scripts/jquery-1.4.1.js , yet navigating to this url I am able to load the js.

Any help would be appreciated.


It's not valid to use the /> shortcut for script tags. It must look like

<script type ="text/javascript" src ="../../Scripts/jquery-1.4.1.js"></script>
0

精彩评论

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

关注公众号