I am so confused by loading JavaScript in the Google App Engine . I am using a Django template.
Firstly, in my base HTML file, I cannot load the downloaded jQuery code from a local user, d:/jquery.js , for example
<script src="d:\jquery.js" type="text/javascript" ></script></head>,
This line is in my base HTML file. It works when I load jQuery from remote . how
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"type="text/javascript" ></script></head>
I do not know why.
Secondly, I cannot load my own JavaScript code into my HTML file. Let's say I create a JavaScript file, such as layout.js , and I try to load it like this in my child HTML file, which, incidentally, is inherited from base HTML.
<body><script src="layout.js" type="text/javascript"></script></body>
And that doesn't work at all. The only way this works, I tried when I put the actual JavaScript code in the body of my base HTML file. how
<body><script> $(document).ready( $("#yes").click(function() { $("#no").hide("slow"); })); </script>
I do not know why ... How to fix this?
source share