title: Can I load images from a folder?
body: <p>I got the snippet online:</p>
  
  <pre><code>&lt;html&gt;
  
  &lt;head&gt;
      &lt;title&gt;&lt;/title&gt;
      &lt;script src="jquery-1.11.0.min.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;script type="text/javascript"&gt;
      var dir = "";
      var fileextension = ".jpg";
      $.ajax({
          url: dir,
          success: function (data) {
              $(data).find("a:contains(" + fileextension + ")").each(function ()
              {
                  var filename = this.href.replace(window.location.host, "").replace("http:///", "");
                  $("body").append($("&lt;img src=" + dir + filename + "&gt;&lt;/img&gt;"));
              });
          }
      });
  &lt;/script&gt;
  
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>But when I try to run this nothing happens. The images are in the same folder (on my Desktop) where the .html file. But can I do this with javascript, or do I need some backend like PHP/ASP.NET or something?</p>