我的php文件中包含的jquery文件无法在服务器上运行[关闭]
问题描述:
i have included jquery.js
, jscript.js
it works fine locally
but when i uploaded jscript.js
is not running
jscript.js has only one line that is
$().ready(function(){
alert (9);
});
我已经包含 jquery.js code>,
jscript.js code> 它本地工作正常
但是当我上传 jscript.js code>没有运行时
jscript.js只有一行 p>
$()。ready(function(){
alert(9);
});
code> pre>
div>
答
problem solved by replacing
<script src="folderOnMyPc/local/jquery.js">
with
<script src="http://code.jquery.com/jquery-latest.min.js">
答
First off change $().ready to $(document).ready and then the next thing to check for is:
- Are you including the jquery library prior to loading your jscript.js?
- Are you including jscript.js in the HTML page?