jQuery从目录中拖动图像 [英] jQuery pull images from directory

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

问题描述

是否可以从本地文件中抽出一堆.jpg图片并将其放入列表中?
对不起,我很模糊



从目录(依赖于索引)
$ b

我想按顺序将它们列在图像标签中。

解决方案

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

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

一些快速搜索导致我找到一个FileSystemObject(ActiveX =()来搜索文件夹中的文件。



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



但是,如果您正在进行任何服务器端处理(.net,php,无论如何),这将是找出可用于在页面上显示哪些图像的最佳方法。 (所以如果你可以澄清)


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')

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

here is a link: http://www.codeproject.com/KB/scripting/search_in_files.aspx

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天全站免登陆