Can't load jquery on Apache
Hi, All:
I have a problem, when I load jquery.js from local, my test server is Apache 2.2.14 and PHP 5.3.1.
The code is :
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>jQuery Starterkit</title>
- <script language="javascript" src="lib/jquery-1.4.2.min.js"></script>
- <script language="javascript">
- $(function() {
- $("input").click(function(){
- alert('Hello World!');
- });
- });
- </script>
- </head>
- <body>
- <lable>pwd : </lable><input type="text" name="text" value="name"/>
- </body>
- </html>
The browser alert (Missing Objects) in localhost. But if I change src to 'http://code.jquery.com/jquery-1.4.2.min.js', or double click html and run in the browser, it takes effective.
So I think there are some problems in my Apache conf file.
How can I fix it?