get_dir.html 495 B

123456789101112131415161718192021222324
  1. <!DOCTYPE HTML>
  2. <html>
  3. <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
  4. <h2> sub dirs </h2>
  5. <div id="dirlist"></div>
  6. <script>
  7. var test = "";
  8. $.ajax({
  9. url : '../services/list_dir.php',
  10. dataType : 'json',
  11. async: false,
  12. success : function (data) {
  13. test = data;
  14. },
  15. })
  16. var a = "";
  17. for (var i = 0; i < test.length; i++) {
  18. a += "<li>" + test[i]+"</li>";
  19. }
  20. document.write(a);
  21. </script>
  22. </html>