dom not loading when referencing an external js file
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>
精彩评论