jQuery 从目录中提取图像 [英] jQuery pull images from directory

查看:43
本文介绍了jQuery 从目录中提取图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以从本地文件中提取一堆.jpg图片并将它们放入列表中?对不起,我太含糊了

Is it possible to pull a bunch of .jpg pictures form a local file and throw them into a list? Sorry, I was very vague

从目录(相对于索引)中拉取.

Pulling from a directory (relitive to the index) like.

我想按顺序在图像标签中列出它们.

I want to list them in an image tag, sequentially.

推荐答案

您可以使用以下内容动态创建图像并将其附加到列表中.

You could use the following to dynamically create an image and append it to a list.

$('<img />')
    .attr('src', 'FOLDER LOCATION HERE')
    .appendTo('#mylist')

一些快速搜索让我找到了一个 FileSystemObject ( ActiveX =( ) 来搜索文件夹中的文件.

some quick searching led me to find a FileSystemObject ( ActiveX =( ) to search a folder for files.

这里是一个链接:http://www.codeproject.com/KB/scripting/search_in_files.aspx

但如果您正在执行任何服务器端处理(.net、php 等),这将是找出您可以在页面上显示哪些图像的最佳方式.(所以如果你能澄清一下)

but if you are doing any server side processing (.net, php, whatever) that would be the best way to figure out what images are available to you to display on the page. (so if you could clarify)

这篇关于jQuery 从目录中提取图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆