Php 如何通过以下ajax jquery请求获得网站上显示的图像
我正试图从以下线程使用ajax jquery请求在网站上加载图像 我有以下脚本Php 如何通过以下ajax jquery请求获得网站上显示的图像,php,javascript,jquery,html,ajax,Php,Javascript,Jquery,Html,Ajax,我正试图从以下线程使用ajax jquery请求在网站上加载图像 我有以下脚本 <script type="text/javascript"> $.ajax({ url: 'loadImage.php', data: "", dataType: 'json', success: function(rows) { for (var i in r
<script type="text/javascript">
$.ajax({
url: 'loadImage.php', data: "", dataType: 'json', success: function(rows)
{
for (var i in rows)
{
var row = rows[i];
var no = row[0];
var image = row[1];
$('#output').append('<img src="/path/to/image/' + image + '"/>');
}
}
});
</script>
它向我显示了一个图像的文本列表——到目前为止,请求正在运行。
它从数据库中获取图像信息。
当我添加“你能给我们看一个(成功时)包含哪些行的示例吗?你看到合适的图像扩展名了吗,比如
.png
和/或.jpg
和/或其他什么?
$('#output').append('img src="/path/to/image/' + image + '"/>');
$('#output').append('<img src="/path/to/image/' + image + '"/>');