golangtest/web/index.html
2019-11-18 23:10:50 +01:00

44 lines
948 B
HTML

<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8">
</head>
<body>
<div id="Ordner"></div>
<script src="/misc/jquery.min.js"></script>
<script type="text/javascript">
var ServerAPI="http://127.0.0.1:8000";
$(document).ready(function() {
$.ajax({
method: "GET",
contentType:'application/json; charset=utf-8',
url: ServerAPI+'/folder/2019-11-15',
dataType: "json",
data: "",
success: function(content){
//http://127.0.0.1:8000/img/2019-11-15/IMG_4186.JPG
for ( var i = 0, l = content.length; i < l; i++ ) {
var ObjInhalt = content[i];
$("#Ordner").append("<li>"+
"<img src=\""+ServerAPI+"/img/2019-11-15/"+ObjInhalt+"\" width=100 height=100>"+
"<a href=\"#\" onclick=\"ShowFolder('"+ObjInhalt+"')\">"+
ObjInhalt+"</a></li>");
}
}
});
});
</script>
</body>
</html>