title: use javascript to access local couchdb
body: <p>I recently met a problem when using javascript to access local CouchDB (127.0.0.1:5984).
  My code is attached below:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;CouchDB jQuery Examples&lt;/title&gt;
      &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
      &lt;script src="/_utils/script/json2.js"&gt;&lt;/script&gt;
      &lt;script src="/_utils/script/sha1.js"&gt;&lt;/script&gt;
      &lt;script src="/_utils/script/jquery.js?1.4.2"&gt;&lt;/script&gt;
      &lt;script src="/_utils/script/jquery.couch.js?0.11.0"&gt;&lt;/script&gt;
      &lt;script src="/_utils/script/jquery.dialog.js?0.11.0"&gt;&lt;/script&gt;
      &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;script&gt;
      function initialize(){
          $.get("http://127.0.0.1:5984/test", function(data, status){
              window.alert("Data: " + data + "\nStatus: " + status);
          });
      }
  &lt;/script&gt;
  &lt;body onload="initialize()"&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I tried my local txt file and it works. But when I tried to access my local CouchDB database called test, and it returns nothing. I have no idea why this will happen.
  BTW, I also tried the "<a href="http://127.0.0.1:5984/test?callback=" rel="nofollow">http://127.0.0.1:5984/test?callback=</a>?" but the result is the same.</p>
  
  <p>Any help will be appreciated. Thanks in advance.</p>